   (let [u (if (string? url) (uri/uri url) url)]
     (assoc u :host (resolve-host (uri/host u)))))
 
-(defn ^:private matches-requirements [session-model requirements]
+(defn matches-requirements [session-model requirements]
   (let [exact-match-keys [:browser-name :reserved]
         resolved-nodes (map (comp str host-resolved-url)
                             (filter identity

(defn session-tags-key [session-id]
  (format session-tags-key-template session-id))

(defn ^:private is-ip? [s]
  (re-matches #"(?:\d{1,3}\.){3}\d{1,3}" s))

(def ^:private Node
  "A schema for a node spec."
  {(s/optional-key :url)   s/Str
   (s/optional-key :id)    s/Str
   (s/optional-key :tags) [s/Str]})

(def ^:private Session
  "A schema for a session spec."
  {:id                            s/Str
   (s/optional-key :tags)        [s/Str]

   (s/optional-key :browser-name) s/Str
   (s/optional-key :node)         Node})

(def Requirement
  "A schema for a session requirement."
  (s/either
    (s/pair :session-tag  "type"  s/Str        "tag")
