This patch adds functions list,managedsave to libvirt_vm.py.
The reason I added managedsave to VM class before is that the object what
will be managedsaved is a domain, while VM class also aims at a domain.^_^
Signed-off-by: Yu Mingfei <[email protected]>
---
client/virt/libvirt_vm.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py
index 1d28559..39193e4 100644
--- a/client/virt/libvirt_vm.py
+++ b/client/virt/libvirt_vm.py
@@ -116,6 +116,20 @@ def virsh_cmd(cmd, uri="", ignore_status=False,
print_info=False):
return ret
+def virsh_list(options="", uri="", ignore_status=False, print_info=False):
+ """
+ Return the list of domains.
+ """
+ return virsh_cmd("list %s" % options, uri, ignore_status, print_info)
+
+
+def virsh_managedsave(name, options="", uri="", ignore_status=False,
print_info=False):
+ """
+ Managed save of a domain state.
+ """
+ return virsh_cmd("managedsave --domain %s %s" % (name, options), uri,
ignore_status, print_info)
+
+
def virsh_freecell(uri = "", ignore_status=False, extra = ""):
"""
Prints the available amount of memory on the machine or within a NUMA cell.
--
1.7.1
--
Best Regards
Yu Mingfei
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel