[Libvirt-cim] [PATCH] [TEST] Fix HostedService.01~04 with sblim base provider installed

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Wed Sep 24 20:34:20 UTC 2008


>> +    else:
>> +        keys = ['Name', 'CreationClassName']   +        try:
>> +            host_sys = enumclass.enumerate(options.ip, 'HostSystem', 
>> keys, options.virt)[0]
>> +        except Exception:
>> +            logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name)
>> +            return FAIL
>>      try:
>>          service = assoc.AssociatorNames(options.ip,
>>                                          "HostedService",
>>   
> I believe we need to do changes to the the way we query assocition.
> The above existing association is not returning any value and hence the 
> following thing present in the code
> if service == None:
> logger.error("No association return")
> return FAIL
> does return an empty list and the further verification down in the for loop
> 
> for item in service:
> logger.error("DEBUG : %s", item.keybindings["CreationClassName"])
> ccn = item.keybindings["CreationClassName"]
> if ccn not in valid_services:
> logger.error("HostedService association to associate HostSystem and %s 
> is wrong " % ccn)
> return FAIL
> does not get executed and the test returns PASS.
> I suggest the following:
> If the above association with HostedService is not supported with 
> Linux_ComputerSystem
> If the query of the association with the HostSystem does not return an 
> record yet, then we should set XFAIL and not PASS when 
> sblim-base-provider is installed.
> 

Yep, I agree here. Instead of service == None, it should be len(service) 
< 1.

-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list