On Thu, Jul 26, 2012 at 5:20 PM, Lucas Meneghel Rodrigues <[email protected]> wrote: > From: Yu Mingfei <[email protected]> > > Signed-off-by: Yu Mingfei <[email protected]> > --- > client/virt/libvirt_vm.py | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py > index 25a403b..54f5ebb 100644 > --- a/client/virt/libvirt_vm.py > +++ b/client/virt/libvirt_vm.py > @@ -116,6 +116,22 @@ 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. > @@ -1746,3 +1762,11 @@ class VM(virt_vm.BaseVM): > Override BaseVM restore_from_file method > """ > virsh_restore(self.name, path, uri=self.connect_uri) > + > + > + def managedsave(self, options="", ignore_status=False, print_info=False): > + """ > + Managed save of this domain. > + """ > + return virsh_managedsave(self.name, options, self.connect_uri, > + ignore_status, print_info)
^ Ok, here is my entire objection against this patch. There's no need to add a public interface to the vm class, as managedsave is more of a management general function. So instead just call the virsh function in the test rather than vm.managedsave. So please send another version of this patchset with this fixed. Thanks for your work, Lucas _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
