libvirt-cim-bounces@redhat.com wrote on 2009-05-08 01:13:54:

> >> +    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.


  I got NetRASDs instead of NetPoolRASDs through this association with latest provider.

[root@elm3b197 cimtest]# wbemcli ain -ac KVM_SettingsDefineCapabilities http://root:elm3b197@localhost/root/virt:KVM_AllocationCapabilities.InstanceID="NetworkPool/cimtest-networkpool"
localhost/root/virt:KVM_NetResourceAllocationSettingData.InstanceID="Minimum"
localhost/root/virt:KVM_NetResourceAllocationSettingData.InstanceID="Minimum"
localhost/root/virt:KVM_NetResourceAllocationSettingData.InstanceID="Maximum"
localhost/root/virt:KVM_NetResourceAllocationSettingData.InstanceID="Maximum"
localhost/root/virt:KVM_NetResourceAllocationSettingData.InstanceID="Default"
localhost/root/virt:KVM_NetResourceAllocationSettingData.InstanceID="Default"
localhost/root/virt:KVM_NetResourceAllocationSettingData.InstanceID="Increment"
localhost/root/virt:KVM_NetResourceAllocationSettingData.InstanceID="Increment"


>
> 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@linux.vnet.ibm.com
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim