<div dir="ltr">Thank you Matt, the background information is important. Seems all the peoples don't know how the add-fixed-ip API works,<div>and there is no exact use case about it. Now neutron port-update API also support to set multiple fixed ip for a port, and</div><div>the fixed-ip updating will sync to nova side automatically (I had verified it in my latest devstack). Updating fixed-ip for</div><div>specified port is easier to understand for me in multiple nics case than nova add-fixed-ip API.</div><div><br></div><div>So if others known the orignal API design or had used nova add/remove fixed-ip API and would like to show your use cases,</div><div>it's nice for us to understand how the API works and when we should use it, we can update the api-ref and add exact usage,</div><div>avoid users' confusion about it. Feel free to reply something, thank you.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-27 23:36 GMT+08:00 Matt Riedemann <span dir="ltr"><<a href="mailto:mriedemos@gmail.com" target="_blank">mriedemos@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 3/27/2017 7:23 AM, Rui Chen wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi:<br>
<br>
    A question about nova AddFixedIp API, nova api-ref[1] describe the<br>
API as "Adds a fixed IP address to a server instance, which associates<br>
that address with the server.", the argument of API is network id, so if<br>
there are two or more subnets in a network, which one is lucky to<br>
associate ip address to the instance? and the API behavior is always<br>
consistent? I'm not sure.<br>
    The latest code[2] get all of the instance's ports and subnets of<br>
the specified network, then loop them, but it return when the first<br>
update_port success, so the API behavior depends on the order of subnet<br>
and port list that return by neutron API. I have no idea about what<br>
scenario we should use the API in, and the original design, anyone know<br>
that?<br>
<br>
[1]: <a href="https://developer.openstack.org/api-ref/compute/#add-associate-fixed-ip-addfixedip-action" rel="noreferrer" target="_blank">https://developer.openstack.or<wbr>g/api-ref/compute/#add-associa<wbr>te-fixed-ip-addfixedip-action</a><br>
[2]: <a href="https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L1366" rel="noreferrer" target="_blank">https://github.com/openstack/n<wbr>ova/blob/master/nova/network/n<wbr>eutronv2/api.py#L1366</a><br>
<br>
<br></div></div>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
<br>
</blockquote>
<br>
I wondered about this API implementation myself awhile ago, see this bug report for details:<br>
<br>
<a href="https://bugs.launchpad.net/nova/+bug/1430512" rel="noreferrer" target="_blank">https://bugs.launchpad.net/nov<wbr>a/+bug/1430512</a><br>
<br>
There was a related change for this from garyk:<br>
<br>
<a href="https://review.openstack.org/#/c/163864/" rel="noreferrer" target="_blank">https://review.openstack.org/#<wbr>/c/163864/</a><br>
<br>
But that was abandoned.<br>
<br>
I'm honestly not really sure what the direction is here. From what I remember when I reported that bug, this was basically a feature-parity implementation in the compute API for the multinic API with nova-network. However, I'm not sure it's very usable. There is a Tempest test for this API, but I think all it does is attach an interface and make sure that does not blow up, it does not try to use the interface to ssh into the guest, for example.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
<br>
Thanks,<br>
<br>
Matt<br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
</font></span></blockquote></div><br></div>