Comment 6 for bug 1430512

Revision history for this message
Corbin Hendrickson (c-hendrickson09) wrote :

I don't know about everyone else but we definitely appreciate the existing functionality of nova add-fixed-ip.

Take for instance the following example (port / subnet / ips changed for demonstration):

+----------------------------------------------------------------+---------+---------------------------+----------------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+----------------------------------------------------------------+---------+--------------------------+-----------------------------------------------------------------------------------------+
| 9e1bcee0-beca-4723-9e68-fa88912cc291 | | fa:16:3e:08:c2:b9 | {"subnet_id": "23ae97b5-f213-4287-a2eb-48753f50a40a", \ "ip_address": "192.160.251.113"} |
| | | | {"subnet_id": "490dbebc-0674-4326-b20e-209940024d86", \ "ip_address": "195.152.250.88"} |
+---------------------------------------------------------------+-----------+--------------------------+----------------------------------------------------------------------------------------+

We have a use case where we are running CentOS cPanel instances in which we just need to append a fixed ip to a port as needed. The existing neutron port-update removes the ip's and adds a new ip or in the case you wanted to re add all your existing ips you must specify them as well. The existing nova add-fixed-ip is perfect for this appending use case.

One feature that lacks however with nova add-fixed-ip is the ability to specify a port_id, ip, and subnet_id. We have modified novaclient and nova api to allow this to work, but it would be nice if it was up streamed to the community. The end result would look something like this from the novaclient perspective:

usage: nova add-fixed-ip [--network_id <network-id>] [--port_id <port-id>]
                         [--ip_address <ip-address>] [--subnet_id <subnet-id>]
                         <server-id>

Add new IP address to network.

Positional arguments:
  <server-id> Name or ID of server.

Optional arguments:
  --network_id <network-id>
                        Network ID.
  --port_id <port-id> Port ID.
  --ip_address <ip-address>
                        IP Address.
  --subnet_id <subnet-id>
                        Subnet ID.

What do you all think?