<div><br></div>Thanks Michael,<div><br></div><div>I had a older version of the python-binding which had bonding in #1 as a compulsory parameter... Seeing your options I updated the sdk and now the error is resolved. I see bonding as an optional param.</div>
<div><br></div><div>Regards,</div><div>Rahul.</div><div><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Michael Pasternak</b> <span dir="ltr"><<a href="mailto:mpastern@redhat.com">mpastern@redhat.com</a>></span><br>
Date: Thu, Jul 5, 2012 at 7:22 PM<br>Subject: Re: [Users] HostNic Addition with IP Address<br>To: Rahul Upadhyaya <<a href="mailto:rakrup@gmail.com">rakrup@gmail.com</a>><br>Cc: <a href="mailto:users@ovirt.org">users@ovirt.org</a><br>
<br><br><br>
Hi Rahul,<br>
<br>
#1 is the right place for doing this, see method __doc__ [1]<br>
#2 used for attaching network to NIC, see __doc__ is [2]<br>
<br>
* note all methods in sdk well documented describing what<br>
parameters-holder to use and how to fill it.<br>
<br>
[1]<br>
'''<br>
@type HostNIC:<br>
<br>
@param <a href="http://hostnic.network.id" target="_blank">hostnic.network.id</a>|name: string<br>
@param <a href="http://hostnic.name" target="_blank">hostnic.name</a>: string<br>
[@param hostnic.bonding.slaves.host_nic: collection]<br>
{<br>
[@ivar <a href="http://host_nic.id" target="_blank">host_nic.id</a>|name: string]<br>
}<br>
[@param hostnic.bonding.options.option: collection]<br>
{<br>
[@ivar <a href="http://option.name" target="_blank">option.name</a>: string]<br>
[@ivar option.value: string]<br>
[@ivar type: string]<br>
}<br>
[@param hostnic.ip.gateway: string]<br>
[@param hostnic.boot_protocol: string]<br>
[@param hostnic.mac: string]<br>
[@param hostnic.ip.address: string]<br>
[@param hostnic.ip.netmask: string]<br>
<br>
@return HostNIC:<br>
'''<br>
<br>
[2]<br>
'''<br>
@type Action:<br>
<br>
@param <a href="http://action.network.id" target="_blank">action.network.id</a>|name: string<br>
[@param action.async: boolean]<br>
[@param action.grace_period.expiry: long]<br>
<br>
@return Response:<br>
'''<br>
<div><div class="h5"><br>
On 07/05/2012 03:00 PM, Rahul Upadhyaya wrote:<br>
> Hi Folks,<br>
><br>
> I am facing issues while adding NIC with Static I.P. to host using the oVirt Python-Bindings. There are two api's<br>
><br>
> 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<br>
> while creating network each time.<br>
><br>
> 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<br>
> 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.<br>
><br>
><br>
> 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 ?<br>
> Also,I see that this operation is supported from the manager UI .<br>
><br>
><br>
> --<br>
> Regards,<br>
> Rahul<br>
> =======================================================<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
<br>
Michael Pasternak<br>
RedHat, ENG-Virtualization R&D<br>
</font></span></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>Rahul<div>=======================================================</div><br>
</div>