<div dir="ltr">Created issue on github as the formatting options and readability are much nicer: <a href="https://github.com/lxc/lxc/issues/385">https://github.com/lxc/lxc/issues/385</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 21, 2014 at 2:29 PM, BB <span dir="ltr"><<a href="mailto:eeg5auquaephoo5j@gmail.com" target="_blank">eeg5auquaephoo5j@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hallo again,<div><br></div><div>I just noticed that even though I set:</div><div> >>> container.network[0].ipv4 = '<a href="http://10.0.10.3/24" target="_blank">10.0.10.3/24</a>'</div><div> </div><div> >>> container.network[0].ipv4</div><div> ['10.0.10.3']</div><div> >>> container.save_config()</div><div><br></div><div>The container's config contains:</div><div> lxc.network.ipv4 = <a href="http://10.0.10.3/8" target="_blank">10.0.10.3/8</a><br></div><div><br></div><div>I also tried:</div><div> >>> container.set_config_item('lxc.network.0.ipv4', '<a href="http://10.0.10.3/24" target="_blank">10.0.10.3/24</a>')</div><div> False</div><div><br></div><div>Kind regards,</div><div><br></div><div>BB</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 21, 2014 at 12:57 PM, BB <span dir="ltr"><<a href="mailto:eeg5auquaephoo5j@gmail.com" target="_blank">eeg5auquaephoo5j@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am trying to set a custom bridge interface for a container:</div><div> >>> container.network[0].link = 'my_bridge'</div><div>This works fine as does setting ipv4 and veth_pair but I cannot find any way to set the gateway:</div><div> >>> container.network[0].ipv4_gateway</div><div> ''</div><div> >>> container.network[0].ipv4_gateway = '10.0.10.1'</div><div><br></div><div> >>> container.network[0].ipv4_gateway</div><div> ''</div><div> >>> container.get_config_item('lxc.network.0.ipv4_gateway')</div><div> ''</div><div> >>> container.set_config_item('lxc.network.0.ipv4_gateway', '10.10.0.1')</div><div> False</div><div> >>> container.set_config_item('lxc.network.0.ipv4_gateway', 'auto')</div><div> lxc_container: Resource temporarily unavailable - invalid ipv4 address: auto</div><div><br></div><div>I also noticed that when I set</div><div> >>> container.network[0].ipv4_gateway = '10.0.10.1'</div><div>ipv4 contains:</div><div> >>> container.network[0].ipv4</div><div> ['10.0.10.3', '10.0.10.1']</div><div>Before setting ipv4_gateway, ipv4 contains only the first IP address that I configured in a previous step.</div><div><br></div><div>Am I using the API wrong?</div><div><br></div><div>Best regards,</div><div><br></div><div>BB</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>