Hi,

I am trying to set a custom bridge interface for a container:
    >>> container.network[0].link = 'my_bridge'
This works fine as does setting ipv4 and veth_pair but I cannot find any
way to set the gateway:
    >>> container.network[0].ipv4_gateway
    ''
    >>> container.network[0].ipv4_gateway = '10.0.10.1'

    >>> container.network[0].ipv4_gateway
    ''
    >>> container.get_config_item('lxc.network.0.ipv4_gateway')
    ''
    >>> container.set_config_item('lxc.network.0.ipv4_gateway', '10.10.0.1')
    False
    >>> container.set_config_item('lxc.network.0.ipv4_gateway', 'auto')
    lxc_container: Resource temporarily unavailable - invalid ipv4 address:
auto

I also noticed that when I set
    >>> container.network[0].ipv4_gateway = '10.0.10.1'
ipv4 contains:
    >>> container.network[0].ipv4
    ['10.0.10.3', '10.0.10.1']
Before setting ipv4_gateway, ipv4 contains only the first IP address that I
configured in a previous step.

Am I using the API wrong?

Best regards,

BB
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to