 
 (defn run-action [type* id]
   (let [post-action (do/generic :post (<< "droplets/~{id}/actions"))]
-    (post-action (hypervisor* :digital-ocean :token) nil  {:type (name type*)}))
+    (post-action (hypervisor* :digital-ocean :token) nil  {:type (name type*)})))
+
+(defn ip [droplet]
+  (get-in droplet [:networks :v4 :ip_address]) 
   )
 
-(defrecord Droplet [token spec]
+(defrecord Droplet [token spec ext]
   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}})))
+     (let [{:keys [droplet message] :as result} (do/create-droplet token nil spec) {:keys [id]} droplet]
+       (when-not droplet 
+         (throw+ {:type ::droplet-fail} message))
+       (s/partial-system (ext :system-id) {:digital-ocean {:id id}})
+       this 
+       ))
 
   (delete [this])
 

     (mappings {:os :image :hostname :name})
     (transform (machine-ts machine))
     (assoc :ssh_keys [(hypervisor* :digital-ocean :ssh-key)])
     (selections [drop-ks [:system-id]] )
     )
  )

(defmethod vconstruct :digital-ocean [{:keys [digital-ocean machine] :as spec}]
  (let [[translated ext] (translate spec)]
     (provider-validation translated)
     (->Droplet (hypervisor* :digital-ocean :token) translated ext)
   )
  )

