[Libvirt-cim] [PATCH] [TEST] Add new functions to pool.py forpoolverificaiton through providers
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Thu May 7 17:13:54 UTC 2009
>> + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + nprasd
>> = get_typed_class(virt, +
>> 'NetPoolResourceAllocationSettingData')
>> + n_list = net_list(server, virt)
>> + for _net_name in n_list:
>> + in_use_addr = dump_netxml(server, _net_name)
>> + if in_use_addr == address:
>> + logger.error("IP address is in use by a different
>> network")
>> + return FAIL
>> + + class_nprasd = eval(nprasd)
>> + nprasd = class_nprasd(addr = address,
>> + netmask = "255.255.255.0",
>> + ipstart = "192.168.0.31",
>> + ipend = "192.168.0.57",
>> + mode = mode)
>>
> Do you think using the following here will avoid the harcoding of the
> NetPoolRASD setting here ?
> wbemcli ain -ac KVM_SettingsDefineCapabilities
> 'http://root:password@localhost/root/virt:KVM_AllocationCapabilities.InstanceID="NetworkPool/0"'
> -nl
>
> localhost/root/virt:KVM_NetPoolResourceAllocationSettingData.InstanceID="Default"
>
> localhost/root/virt:KVM_NetPoolResourceAllocationSettingData.InstanceID="Minimum"
>
> localhost/root/virt:KVM_NetPoolResourceAllocationSettingData.InstanceID="Maximum"
>
> localhost/root/virt:KVM_NetPoolResourceAllocationSettingData.InstanceID="Increment"
>
>
> You could use the default o/p from the above query.
>
Thanks Deepti - this is what I meant by the template NetPoolRASDs.
Instead of building the instances of NetPoolRASDs by hand, you can use
the instances returned by SDC.
You'll probably want a function that does this. You can look at the
get_default_rasd_mofs() in rasd.py - this gets the template RASDs for
the non-pool related RASDs.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list