                (catch Throwable e false))
             {:type ::ssh-failed :timeout timeout} "Timed out while waiting for ssh"))
 
+(defn map-key [m from to]
+  (dissoc-in* (assoc-in m to (get-in m from)) from))
+
 ; common validations
 (validation :ip 
     (when-not-nil (partial re-find #"\d+\.\d+\.\d+\.\d+") "must be a legal ip address"))

     (apply juxt (map select kys)))))

(defn os->template 
  "Os key to vmware template" 
  [hyp]
  (fn [os]
    (let [ks [hyp :ostemplates os]]

(ns celestial.provider
  "common providers functions"
    (:require 
      [flatland.useful.map :refer (dissoc-in*)]
      [subs.core :refer (validation when-not-nil)]
      [supernal.sshj :refer (ssh-up?)] 
      [celestial.model :refer (hypervisor)]
