[Libvirt-cim] [PATCH] [TEST][Resubmitting: Addition] Add cross-provider test case 06_hs_to_vsms.py

Dan Smith danms at us.ibm.com
Wed Apr 2 18:15:32 UTC 2008


DK> +        if len(assoc_info) < 3 :
DK> +            logger.error("%s returned %i %s objects, expected atleast 3", an, len(assoc_info), qcn)
DK> +            status = FAIL
DK> +    except Exception, detail:
DK> +        print_err(CIM_ERROR_ASSOCIATORNAMES, detail, an)
DK> +        status = FAIL
DK> +
DK> +    return status, assoc_info

As with the others, I think checking that it's >0 is sufficient for
validation (as long as you check that you get the expected instances
back as well) and is less prone to breakage.

DK> +def get_vsms_info():
DK> +    status, host_name, classname = get_host_info(server, virt)
DK> +    if status != PASS:
DK> +        return status, []
DK> +    status, service_assoc_info = get_assocnames_info(server, classname, 
DK> +                                                     assoc_name, req_cn, host_name)
DK> +    if status != PASS or len(service_assoc_info) == 0:
DK> +        return status, service_assoc_info
DK> +    filter_name  =  {"key" : "Name"}
DK> +    filter_value =  'MigrationService'
DK> +    cn = 'VirtualSystemMigrationService'
DK> +    status, vsms_list = get_inst_from_list(server, cn, service_assoc_info, filter_name, 
DK> +                                                                          filter_value)

As far as I can tell, get_inst_from_list() just uses the 'key' field
of filter_name directly.  Please just pass the name instead of a dict.

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080402/df60a8f1/attachment.sig>


More information about the Libvirt-cim mailing list