 
 
 
+; (clojure.pprint/pprint (do/regions (get* :hypervisor :dev :digital-ocean :token)))


(defn run-action [type* id]
  (let [post-action (do/generic :post (<< "droplets/~{id}/actions"))]
    (post-action (hypervisor* :digital-ocean :token) nil  {:type (name type*)}))
  )

(defrecord Droplet [token spec]
  Vm
  (create [this]
     (let [{:keys [droplet]} (do/create-droplet token nil spec) {:keys [id]} droplet]
       (s/partial-system (spec :system-id) {:digital-ocean {:id id}})))

  (delete [this])


(ns digital.provider
   "Digital ocean provider"
   (:require  
     [slingshot.slingshot :refer (throw+)]
     [clojure.tools.trace :as tr]
     [digital.validations :refer (provider-validation)]
     [clojure.core.strint :refer (<<)]
