[ovirt-users] [Python SDK] Setup Host network with IP address

TranceWorldLogic . tranceworldlogic at gmail.com
Fri Mar 24 04:44:53 UTC 2017


Sorry, I made a stupid mistake.
I given wrong IP itself ... it need to be 30 rather than 300.

Please ignore mail.

On Fri, Mar 24, 2017 at 10:12 AM, TranceWorldLogic . <
tranceworldlogic at gmail.com> wrote:

> Hi,
>
> I am trying to setup network via python sdk as shown below:
>
> myhost_service.setup_networks( modified_network_attachments = [
>                                     types.NetworkAttachment(
>                                         host = myhost,
>                                         host_nic =
> types.HostNic(name="eth0"),
>                                         network =
> types.Network(name="Hello"),
>                                         ip_address_assignments = [
>                                             types.IpAddressAssignment(
>                                                 assignment_method =
> types.BootProtocol.STATIC,
>                                                 ip = types.Ip(
>
> address="192.168.300.10",
>
> netmask="255.255.255.0",
>
> version=types.IpVersion.V4,
>                                                 ),
>                                             )
>                                         ],
>                                     ),
>                                ] )
>
>
> But I am getting below error:
> "ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is
> "[Bad format of IPv4 address]". HTTP response code is 400."
>
> Please help me.
> Ovirt release version = 4.0
>
> Thanks,
> ~Rohit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170324/0b8491ea/attachment-0001.html>


More information about the Users mailing list