[Libvirt-cim] [PATCH] [TEST Split lines to 80-char width limit in SettingsDefineCapabilities/01_forward.py

Guo Lian Yun yunguol at cn.ibm.com
Fri Feb 6 09:31:40 UTC 2009


libvirt-cim-bounces at redhat.com wrote on 2009-02-06 15:13:53:

> 
> 
> yunguol at cn.ibm.com wrote:
> > # HG changeset patch
> > # User Guolian Yun <yunguol at cn.ibm.com>
> > # Date 1233825583 28800
> > # Node ID 3fc2b8a203339c6a59b5f0e2a159e3e0a802ea6d
> > # Parent  edfa908a60d058c7f1ba7394bd1d818999802287
> > [TEST Split lines to 80-char width limit in 
> SettingsDefineCapabilities/01_forward.py
> >
> > This tc fails because of the number of RASD objects, I've sent a 
> patch with fix
> > Tested for KVM/LXC with current sources
> >
> > Signed-off-by: Guolian Yun<yunguol at cn.ibm.com>
> >
> > diff -r edfa908a60d0 -r 3fc2b8a20333 suites/libvirt-
> cim/cimtest/SettingsDefineCapabilities/01_forward.py
> > --- a/suites/libvirt-
> cim/cimtest/SettingsDefineCapabilities/01_forward.py   Tue Feb 03 
> 09:37:05 2009 -0800
> > +++ b/suites/libvirt-
> cim/cimtest/SettingsDefineCapabilities/01_forward.py   Thu Feb 05 
> 01:19:43 2009 -0800
> > @@ -92,10 +92,15 @@
> >          Creating the lists that will be used for comparisons.
> >      """
> > 
> > +    memrasd = get_typed_class(virt, 
"MemResourceAllocationSettingData")
> > +    diskrasd = get_typed_class(virt, 
"DiskResourceAllocationSettingData")
> > +    netrasd = get_typed_class(virt, 
"NetResourceAllocationSettingData")
> > +    procrasd = get_typed_class(virt, 
"ProcResourceAllocationSettingData")
> > + 
> > 
> Daisy,
> Instead of manually adding the vaious RASD's we could probably use the 
> enum_rasds here.
> The advantage will be that we need not have to be bothered to add a new 
> RASD when that happens.
> There are # of test cases which require something similar to what you 
> have modified here.
> For ex: you can refer the SettingsDefine/02_reverse.py tc as a 
reference.

   Good point. There is no time to fix it today. May I send a patch with 
fix
   next Monday?

   Thanks!
> 
> >      if virt == 'LXC':
> >          instlist = [ pool[1].InstanceID ]
> > -        cllist = [ get_typed_class(virt, 
> "MemResourceAllocationSettingData") ]
> > -        rtype = { get_typed_class(virt, 
> "MemResourceAllocationSettingData")  :  4 }
> > +        cllist = [ memrasd ]
> > +        rtype = { memrasd  :  4 }
> >      else: 
> >          instlist = [ 
> >                      pool[0].InstanceID,
> > @@ -103,17 +108,12 @@
> >                      pool[2].InstanceID, 
> >                      pool[3].InstanceID
> >                     ]
> > -        cllist = [ 
> > -                  get_typed_class(virt, 
> "DiskResourceAllocationSettingData"),
> > -                  get_typed_class(virt, 
> "MemResourceAllocationSettingData"), 
> > -                  get_typed_class(virt, 
> "NetResourceAllocationSettingData"), 
> > -                  get_typed_class(virt, 
> "ProcResourceAllocationSettingData")
> > -                 ]
> > +        cllist = [ diskrasd, memrasd, netrasd, procrasd ] 
> >          rtype = { 
> > -                  get_typed_class(virt, 
> "DiskResourceAllocationSettingData") : 17, 
> > -                  get_typed_class(virt, 
> "MemResourceAllocationSettingData")  :  4, 
> > -                  get_typed_class(virt, 
> "NetResourceAllocationSettingData")  : 10, 
> > -                  get_typed_class(virt, 
> "ProcResourceAllocationSettingData") :  3
> > +                  diskrasd : 17, 
> > +                  memrasd  :  4, 
> > +                  netrasd  : 10, 
> > +                  procrasd :  3
> >                  }
> >      rangelist = {
> >                    "Default"   : 0, 
> >
> > _______________________________________________
> > Libvirt-cim mailing list
> > Libvirt-cim at redhat.com
> > https://www.redhat.com/mailman/listinfo/libvirt-cim
> > 
> 
> -- 
> Thanks and Regards,
> Deepti B. Kalakeri
> IBM Linux Technology Center
> deeptik at linux.vnet.ibm.com
> 
> _______________________________________________
> 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/20090206/c8f8fa59/attachment.htm>


More information about the Libvirt-cim mailing list