
Hi Rahul, #1 is the right place for doing this, see method __doc__ [1] #2 used for attaching network to NIC, see __doc__ is [2] * note all methods in sdk well documented describing what parameters-holder to use and how to fill it. [1] ''' @type HostNIC: @param hostnic.network.id|name: string @param hostnic.name: string [@param hostnic.bonding.slaves.host_nic: collection] { [@ivar host_nic.id|name: string] } [@param hostnic.bonding.options.option: collection] { [@ivar option.name: string] [@ivar option.value: string] [@ivar type: string] } [@param hostnic.ip.gateway: string] [@param hostnic.boot_protocol: string] [@param hostnic.mac: string] [@param hostnic.ip.address: string] [@param hostnic.ip.netmask: string] @return HostNIC: ''' [2] ''' @type Action: @param action.network.id|name: string [@param action.async: boolean] [@param action.grace_period.expiry: long] @return Response: ''' On 07/05/2012 03:00 PM, Rahul Upadhyaya wrote:
Hi Folks,
I am facing issues while adding NIC with Static I.P. to host using the oVirt Python-Bindings. There are two api's
1) HostNics.add :Here it requires binding param for interface bonding as a compulsory param. I dont want to bond more than one interfaces for a network while creating network each time.
2) HostNic.attach: This lets me attach the NIC but does not let me put static IP address to it as soon as I add it. I am using a workaround of updating the NIC with the IP information, but it requires me to put all the hosts on maintenance and shut-down all the running VMs which again is not the best way of doing it.
Is it not supported by the API that at the time of addition of the hostNIC we can specify the IP address or is it something that I am missing ? Also,I see that this operation is supported from the manager UI .
-- Regards, Rahul =======================================================
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
-- Michael Pasternak RedHat, ENG-Virtualization R&D