virsh_cmd() adds "virsh " in front of a virsh command, so the "virsh " prefix 
is unnecessary in VM.destroy() and VM.shutdown().

Signed-off-by: Tang <[email protected]>
---
 client/virt/libvirt_vm.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py
index c825661..de60d12 100644
--- a/client/virt/libvirt_vm.py
+++ b/client/virt/libvirt_vm.py
@@ -223,7 +223,7 @@ def virsh_shutdown(name, uri = ""):
     if virsh_domstate(name, uri) == 'shut off':
         return True
     try:
-        virsh_cmd("virsh shutdown %s" % (name), uri)
+        virsh_cmd("shutdown %s" % (name), uri)
         return True
     except error.CmdError:
         logging.error("Shutdown VM %s failed", name)
@@ -242,7 +242,7 @@ def virsh_destroy(name, uri = ""):
     if virsh_domstate(name, uri) == 'shut off':
         return True
     try:
-        virsh_cmd("virsh destroy %s" % (name), uri)
+        virsh_cmd("destroy %s" % (name), uri)
         return True
     except error.CmdError:
         logging.error("Destroy VM %s failed", name)
-- 
1.7.3.1


-- 
Best Regards,
Tang chen

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to