[Libvirt-cim] [PATCH 2 of 3] [TEST] Changes to vsms for IPv6 testcase

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Thu Dec 3 18:01:08 UTC 2009


Sharad Mishra wrote:
> # HG changeset patch
> # User Sharad Mishra <snmishra at us.ibm.com>
> # Date 1259799211 28800
> # Node ID 8a1871391e3757b54e3ad3992236f14da9d9b564
> # Parent  75243e330ed72b9d57516019ef9b185960503f17
> [TEST] Changes to vsms for IPv6 testcase.
> 
> Signed-off-by: Sharad Mishra <snmishra at us.ibm.com>
> 
> diff -r 75243e330ed7 -r 8a1871391e37 suites/libvirt-cim/lib/XenKvmLib/vsms.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py	Wed Dec 02 16:13:22 2009 -0800
> +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py	Wed Dec 02 16:13:31 2009 -0800
> @@ -255,7 +255,7 @@
> 
> 
>  class CIM_GraphicsResourceAllocationSettingData(CIMClassMOF):
> -    def __init__(self, name, res_sub_type="vnc", ip="127.0.0.1", 
> +    def __init__(self, name, res_sub_type="vnc", ip="", ipv6="",

I would change ip="" to ip=None and ipv6="" to ipv6=None.

Also, ip and ipv6 is a little ambiguous.  Just looking at the input 
parameters, I'm not sure what the difference is between the two.  I'd 
change ipv6 to something like "set_ipv6".  Something similar that 
indicates its a boolean flag that indicates what type of IP is being 
passed in for the ip param.


>                   lport='-1', keymap="en-us", vnc_passwd=None):
>          self.InstanceID = '%s/graphics' %name
>          self.ResourceType = RASD_TYPE_GRAPHICS
> @@ -266,6 +266,9 @@
>          if ip != None and lport != None:
>             self.Address = '%s:%s' % (ip, lport)
> 
> +        if ipv6 != None:
> +           self.IsIPv6Only = ipv6
> +        
>          if keymap != None:
>             self.KeyMap = keymap
>          
> 
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim




More information about the Libvirt-cim mailing list