+1.


Best,
Regards

Daisy (Ô˹úÁ«)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol@cn.ibm.com
TEL: (86)-21-60922403
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203


libvirt-cim-bounces@redhat.com wrote on 2008-12-24 05:11:01:

> # HG changeset patch
> # User Kaitlin Rupert <karupert@us.ibm.com>
> # Date 1230066638 28800
> # Node ID 0efe95dfa11a48f887900b41d5a83ecb1f07321f
> # Parent  6c6eaaebaf9c5478d86157d61995ecea979362cc
> [TEST] Remove virt and test_dom params from cim_() functions.
>
> These values are already part of the VirtCIM class.
>
> Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com>
>
> diff -r 6c6eaaebaf9c -r 0efe95dfa11a suites/libvirt-
> cim/cimtest/ComputerSystem/05_activate_defined_start.py
> --- a/suites/libvirt-
> cim/cimtest/ComputerSystem/05_activate_defined_start.py   Tue Dec 23
> 12:19:30 2008 -0800
> +++ b/suites/libvirt-
> cim/cimtest/ComputerSystem/05_activate_defined_start.py   Tue Dec 23
> 13:10:38 2008 -0800
> @@ -87,7 +87,7 @@
>  
>      try:
>          #Change the state of the  VS to Start
> -        status = cxml.cim_start(options.ip, options.virt, test_dom)
> +        status = cxml.cim_start(options.ip)
>          if status != PASS:      
>              logger.error("Unable start dom '%s' using "
>                           "RequestedStateChange()", test_dom)
> diff -r 6c6eaaebaf9c -r 0efe95dfa11a suites/libvirt-
> cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py
> --- a/suites/libvirt-
> cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py  
> Tue Dec 23 12:19:30 2008 -0800
> +++ b/suites/libvirt-
> cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py  
> Tue Dec 23 13:10:38 2008 -0800
> @@ -59,7 +59,7 @@
>      if not ret:
>          logger.error("Failed to Define the dom: %s", test_dom)
>          return FAIL    
> -    status = vsxml.cim_start(options.ip, options.virt, test_dom)
> +    status = vsxml.cim_start(options.ip)
>      if status != PASS:
>          logger.error("Failed to Start the dom: %s", test_dom)
>          vsxml.undefine(options.ip)
> diff -r 6c6eaaebaf9c -r 0efe95dfa11a suites/libvirt-
> cim/cimtest/Processor/03_proc_gi_errs.py
> --- a/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py   Tue
> Dec 23 12:19:30 2008 -0800
> +++ b/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py   Tue
> Dec 23 13:10:38 2008 -0800
> @@ -102,7 +102,7 @@
>          logger.error("Failed to define the guest: %s", test_dom)
>          return FAIL
>  
> -    status = vsxml.cim_start(options.ip, options.virt, test_dom)
> +    status = vsxml.cim_start(options.ip)
>      if status != PASS:
>          logger.error("Failed to start the guest: %s", test_dom)
>          vsxml.undefine(options.ip)
> diff -r 6c6eaaebaf9c -r 0efe95dfa11a suites/libvirt-
> cim/cimtest/SettingsDefine/01_forward.py
> --- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py   Tue
> Dec 23 12:19:30 2008 -0800
> +++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py   Tue
> Dec 23 13:10:38 2008 -0800
> @@ -57,7 +57,7 @@
>          logger.error("Failed to Create the dom: %s", test_dom)
>          return FAIL, cmxl
>  
> -    status = cxml.cim_start(server, virt, test_dom)
> +    status = cxml.cim_start(server)
>      if status != PASS:
>          logger.error("Unable start dom '%s'", test_dom)
>          cxml.undefine(server)
> diff -r 6c6eaaebaf9c -r 0efe95dfa11a suites/libvirt-
> cim/cimtest/SettingsDefine/02_reverse.py
> --- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py   Tue
> Dec 23 12:19:30 2008 -0800
> +++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py   Tue
> Dec 23 13:10:38 2008 -0800
> @@ -82,7 +82,7 @@
>          logger.error("Failed to Create the dom: %s", test_dom)
>          return FAIL, cmxl
>  
> -    status = cxml.cim_start(server, virt, test_dom)
> +    status = cxml.cim_start(server)
>      if status != PASS:
>          logger.error("Unable start dom '%s'", test_dom)
>          cxml.undefine(server)
> diff -r 6c6eaaebaf9c -r 0efe95dfa11a suites/libvirt-cim/lib/XenKvmLib/vxml.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py   Tue Dec 23 12:19:302008 -0800
> +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py   Tue Dec 23 13:10:382008 -0800
> @@ -578,48 +578,40 @@
>              logger.error("Exception: %s", detail)
>              return FAIL
>  
> -        status = self.poll_for_state_change(server, domain_name,
> cs_class, keys,
> +        status = self.poll_for_state_change(server, domain_name,
> cs_class, keys,
>                                              req_state, poll_time)
>          return status
>  
> -    def cim_start(self, server, virt, domain_name,
> -                  req_time=const.TIME, poll_time=30):
> -        return self.cim_state_change(server, virt, domain_name,
> +    def cim_start(self, server, req_time=const.TIME, poll_time=30):
> +        return self.cim_state_change(server, self.virt, self.domain_name,
>                                       const.CIM_ENABLE, req_time, poll_time)
>  
> -    def cim_disable(self, server, virt, domain_name,
> -                    req_time=const.TIME, poll_time=30):
> -        return self.cim_state_change(server, virt, domain_name,
> +    def cim_disable(self, server, req_time=const.TIME, poll_time=30):
> +        return self.cim_state_change(server, self.virt, self.domain_name,
>                                       const.CIM_DISABLE, req_time, poll_time)
>  
> -    def cim_shutdown(self, server, virt, domain_name,
> -                     req_time=const.TIME, poll_time=30):
> -        return self.cim_state_change(server, virt, domain_name,
> +    def cim_shutdown(self, server, req_time=const.TIME, poll_time=30):
> +        return self.cim_state_change(server, self.virt, self.domain_name,
>                                       const.CIM_SHUTDOWN, req_time, poll_time)
>  
> -    def cim_no_state_change(self, server, virt, domain_name,
> -                            req_time=const.TIME, poll_time=30):
> -        return self.cim_state_change(server, virt, domain_name,
> +    def cim_no_state_change(self, server, req_time=const.TIME,
> poll_time=30):
> +        return self.cim_state_change(server, self.virt, self.domain_name,
>                                       const.CIM_NOCHANGE, req_time, poll_time)
>  
> -    def cim_suspend(self, server, virt, domain_name,
> -                    req_time=const.TIME, poll_time=30):
> -        return self.cim_state_change(server, virt, domain_name,
> +    def cim_suspend(self, server, req_time=const.TIME, poll_time=30):
> +        return self.cim_state_change(server, self.virt, self.domain_name,
>                                       const.CIM_SUSPEND, req_time, poll_time)
>  
> -    def cim_pause(self, server, virt, domain_name,
> -                    req_time=const.TIME, poll_time=30):
> -        return self.cim_state_change(server, virt, domain_name,
> +    def cim_pause(self, server, req_time=const.TIME, poll_time=30):
> +        return self.cim_state_change(server, self.virt, self.domain_name,
>                                       const.CIM_PAUSE, req_time, poll_time)
>          
> -    def cim_reboot(self, server, virt, domain_name,
> -                   req_time=const.TIME, poll_time=30):
> -        return self.cim_state_change(server, virt, domain_name,
> +    def cim_reboot(self, server, req_time=const.TIME, poll_time=30):
> +        return self.cim_state_change(server, self.virt, self.domain_name,
>                                       const.CIM_REBOOT, req_time, poll_time)
>  
> -    def cim_reset(self, server, virt, domain_name,
> -                  req_time=const.TIME, poll_time=30):
> -        return self.cim_state_change(server, virt, domain_name,
> +    def cim_reset(self, server, req_time=const.TIME, poll_time=30):
> +        return self.cim_state_change(server, self.virt, self.domain_name,
>                                       const.CIM_RESET, req_time, poll_time)
>  
>  
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim