Thank you Matt, the background information is important. Seems all the peoples don't know how the add-fixed-ip API works, 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 the fixed-ip updating will sync to nova side automatically (I had verified it in my latest devstack). Updating fixed-ip for specified port is easier to understand for me in multiple nics case than nova add-fixed-ip API.
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, 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, avoid users' confusion about it. Feel free to reply something, thank you. 2017-03-27 23:36 GMT+08:00 Matt Riedemann <mriede...@gmail.com>: > On 3/27/2017 7:23 AM, Rui Chen wrote: > >> Hi: >> >> A question about nova AddFixedIp API, nova api-ref[1] describe the >> API as "Adds a fixed IP address to a server instance, which associates >> that address with the server.", the argument of API is network id, so if >> there are two or more subnets in a network, which one is lucky to >> associate ip address to the instance? and the API behavior is always >> consistent? I'm not sure. >> The latest code[2] get all of the instance's ports and subnets of >> the specified network, then loop them, but it return when the first >> update_port success, so the API behavior depends on the order of subnet >> and port list that return by neutron API. I have no idea about what >> scenario we should use the API in, and the original design, anyone know >> that? >> >> [1]: https://developer.openstack.org/api-ref/compute/#add-associa >> te-fixed-ip-addfixedip-action >> [2]: https://github.com/openstack/nova/blob/master/nova/network/n >> eutronv2/api.py#L1366 >> >> >> ____________________________________________________________ >> ______________ >> OpenStack Development Mailing List (not for usage questions) >> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscrib >> e >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >> >> > I wondered about this API implementation myself awhile ago, see this bug > report for details: > > https://bugs.launchpad.net/nova/+bug/1430512 > > There was a related change for this from garyk: > > https://review.openstack.org/#/c/163864/ > > But that was abandoned. > > 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. > > -- > > Thanks, > > Matt > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev