In case someone stumbles across this like I did. What's happening in the first case is that the client parsing is getting confused and turns that into a list of two port updates, one specifying a subnet_id and one specifying an ip_address. The latter ends up giving you the IP you wanted and the first one allocates a random IP from the subnet.
There is no way to just add an IP with the CLI without specifying the old addresses. We don't have a concept of a patch list in the API as far as I can tell. This seems to be a bug in the way the neutron client breaks down the first case into a list of two things. For example, the following works to set three IP addresses: neutron port-update 7521786b-6c7f-4385-b5e1-fb9565552696 --fixed-ips type=dict {ip_address=42.42.42.93,ip_address=42.42.42.92,ip_address=42.42.42.91} ** Changed in: neutron Status: Incomplete => Confirmed ** Project changed: neutron => python-neutronclient -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1341096 Title: neutron port-update allocates double fixed ip Status in Python client library for Neutron: Confirmed Bug description: 1.create a new port 707BE8C6:/home # neutron port-create 23d588e1-3861-4f6f-89ed-2b177e7b8b36 --name why_port Created a new port: +-----------------------+----------------------------------------------------------------------------------+ | Field | Value | +-----------------------+----------------------------------------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | | | binding:capabilities | {"port_filter": false} | | binding:host_id | | | binding:profile | {} | | binding:vif_details | {} | | binding:vif_type | unbound | | binding:vnic_type | normal | | device_id | | | device_owner | | | fixed_ips | {"subnet_id": "7f5ae8f6-3882-4e58-bea7-1d76c5fa1bc1", "ip_address": "200.1.1.7"} | | id | d91892d0-43cf-4929-ba58-92da2a723e62 | | mac_address | fa:16:3e:0e:ac:b6 | | mac_range_id | | | name | why_port | | network_id | 23d588e1-3861-4f6f-89ed-2b177e7b8b36 | | status | DOWN | | tenant_id | 4015230803414ea3b183d4f3a4e57a57 | +-----------------------+----------------------------------------------------------------------------------+ 2.update the port 707BE8C6:/home # neutron port-update d91892d0-43cf-4929-ba58-92da2a723e62 --fixed-ips type=dict {subnet_id=7f5ae8f6-3882-4e58-bea7-1d76c5fa1bc1,ip_address=200.1.1.5} Updated port: d91892d0-43cf-4929-ba58-92da2a723e62 3. show the port 707BE8C6:/home # neutron port-show d91892d0-43cf-4929-ba58-92da2a723e62 +-----------------------+----------------------------------------------------------------------------------+ | Field | Value | +-----------------------+----------------------------------------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | | | binding:capabilities | {"port_filter": false} | | binding:host_id | | | binding:profile | {} | | binding:vif_details | {} | | binding:vif_type | unbound | | binding:vnic_type | normal | | device_id | | | device_owner | | | extra_dhcp_opts | | | fixed_ips | {"subnet_id": "7f5ae8f6-3882-4e58-bea7-1d76c5fa1bc1", "ip_address": "200.1.1.8"} | | | {"subnet_id": "7f5ae8f6-3882-4e58-bea7-1d76c5fa1bc1", "ip_address": "200.1.1.5"} | | id | d91892d0-43cf-4929-ba58-92da2a723e62 | | mac_address | fa:16:3e:0e:ac:b6 | | name | why_port | | network_id | 23d588e1-3861-4f6f-89ed-2b177e7b8b36 | | status | DOWN | | tenant_id | 4015230803414ea3b183d4f3a4e57a57 | +-----------------------+----------------------------------------------------------------------------------+ we can see, the port allocates two fixed ip "ip_address": "200.1.1.8" and "ip_address": "200.1.1.5" To manage notifications about this bug go to: https://bugs.launchpad.net/python-neutronclient/+bug/1341096/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp