[Libvirt-cim] [PATCH 2 of 3] [TEST] update EC.03 for XenFV and KVM support

Guo Lian Yun yunguol at cn.ibm.com
Tue Apr 1 03:15:00 UTC 2008


libvirt-cim-bounces at redhat.com wrote on 2008-04-01 09:40:04:

> Guo Lian Yun wrote:
> > @@ -67,18 +68,20 @@ def main():
> >  def main():
> >      options = main.options
> >      rc = PASS
> > +    log_param()
> >
> > -    instanceref = CIMInstanceName("Xen_HostSystem",
> > +    instanceref = CIMInstanceName(get_typed_class(options.virt,
> "HostSystem"),
> #1
>
> >                                    keybindings = {"Name" :
> "wrong", "CreationClassName" : "wrong"})
> > -    rc = try_assoc(instanceref, "Xen_HostSystem", exp_rc,
> exp_desc, options)
> > +    rc = try_assoc(instanceref, get_typed_class(options.virt,
> "HostSystem"), exp_rc, exp_desc, options)
> #2
>
> >
> >      if rc != PASS:
> >          status = FAIL
> >          return status
> >
> > -    instance_cs = CIMInstanceName("Xen_ComputerSystem",
> > -                                  keybindings = {"Name" :
> "wrong", "CreationClassName" : "Xen_ComputerSystem"})
> > -    rc = try_assoc(instance_cs, "Xen_ComputerSystem", exp_rc,
> exp_desc, options)
> > +    instance_cs = CIMInstanceName(get_typed_class(options.virt,
> "ComputerSystem"),
> #3
>
> > +                                  keybindings = {"Name" : "wrong",
> > +
> "CreationClassName" : get_typed_class(options.virt,"ComputerSystem")})
> > +    rc = try_assoc(instance_cs, get_typed_class(options.virt,
> "ComputerSystem"), exp_rc, exp_desc, options)
> #4
>
> #1 & #2, #3 & #4 share some common code. I would consider use a variable
> to avoid duplicated get_typed_class() call.

  Good catch!
  Changed and resubmit.
>
> >      if rc != PASS:
> >          status = FAIL
> >          return status
> >
> > _______________________________________________
> > Libvirt-cim mailing list
> > Libvirt-cim at redhat.com
> > https://www.redhat.com/mailman/listinfo/libvirt-cim
> >
>
>
> --
> - Zhengang
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080401/f42d7bb9/attachment.htm>


More information about the Libvirt-cim mailing list