diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-09-21 20:28:54 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-09-21 20:28:54 -0400 |
commit | 9b09d8219d0875281c5e53342580979c614320a6 (patch) | |
tree | d11727d40751f1ffc78a70c85c8f7a862569e952 | |
parent | 68d56ed19c80804bf26dd8961bcad48166c4c5ca (diff) | |
download | third_party-func-9b09d8219d0875281c5e53342580979c614320a6.tar.gz third_party-func-9b09d8219d0875281c5e53342580979c614320a6.tar.xz third_party-func-9b09d8219d0875281c5e53342580979c614320a6.zip |
Fix up virt code some more.
-rw-r--r-- | client/test_func.py | 2 | ||||
-rwxr-xr-x | modules/virt.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/client/test_func.py b/client/test_func.py index 19ec3af..281fb6d 100644 --- a/client/test_func.py +++ b/client/test_func.py @@ -22,7 +22,7 @@ if TEST_SERVICES: if TEST_VIRT: # example of using koan to install a virtual machine - # s.virt_install("mdehaan.rdu.redhat.com","fc7webserver",False) + #s.virt_install("mdehaan.rdu.redhat.com","profileX") # wait ... vms = s.virt_list_vms() diff --git a/modules/virt.py b/modules/virt.py index dc9a13a..319c2f3 100755 --- a/modules/virt.py +++ b/modules/virt.py @@ -53,7 +53,7 @@ class FuncLibvirtConnection(): conn = libvirt.open("qemu:///system") if not conn: - raise FuncException(comment="hypervisor connection failure") + raise codes.FuncException("hypervisor connection failure") self.conn = conn @@ -84,7 +84,7 @@ class FuncLibvirtConnection(): if vm.name() == vmid: return vm - raise FuncException(comment="virtual machine %s not found" % needle) + raise codes.FuncException("virtual machine %s not found" % needle) def shutdown(self, vmid): return self.find_vm(vmid).shutdown() @@ -171,10 +171,10 @@ class Virt(func_module.FuncModule): conn = self.get_conn() if conn is None: - raise FuncException(comment="no connection") + raise codes.FuncException("no connection") if not os.path.exists("/usr/bin/koan"): - raise FuncException(comment="no /usr/bin/koan") + raise codes.FuncException("no /usr/bin/koan") target = "profile" if system: target = "system" @@ -192,7 +192,7 @@ class Virt(func_module.FuncModule): if rc == 0: return 0 else: - raise FuncException(comment="koan returned %d" % rc) + raise codes.FuncException("koan returned %d" % rc) def shutdown(self, vmid): |