       (let [{:keys [image target]} domain]
         (clone-domain connection image target)))) 
 
-  (delete [this])
+  (delete [this]
+    (with-connection 
+      (.destroy (get-domain connection (domain :name))))
+    )
 
-  (start [this])
+  (start [this]
+    (with-connection 
+      (.create (get-domain connection (domain :name)))))
 
-  (stop [this])
+  (stop [this]
+    (with-connection 
+      (.shutdown (get-domain connection (domain :name)))))
 
-  (status [this])
+  (status [this]
+    (with-connection 
+      (state (get-domain connection (domain :name))) 
+      ) 
+    )
 
   (ip [this]))
 


(timbre/refer-timbre)

(defn connection [{:keys [host user port]}] 
  (connect (<< "qemu+ssh://~{user}@~{host}:~{port}/system")))

(defmacro with-connection [& body]
  `(let [~'connection (connection ~'node)] (do ~@body)))

    [kvm.validations :refer (provider-validation)]
    [clojure.core.strint :refer (<<)] 
    [kvm.clone :refer (clone-domain)]
    [kvm.common :refer (connect get-domain state)]
    [supernal.sshj :refer (ssh-up?)]
    [celestial.core :refer (Vm)] 
    [taoensso.timbre :as timbre]
