Support floating ip associate/disassociate

Bug #1701079 reported by hongbin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

Right now, OSC has the following commands:

  server add floating ip Add floating IP address to server
  server remove floating ip Remove floating IP address from server

These commands only work for Nova but couldn't work in general (i.e. add floating ip to Kuryr-enabled container). This bug suggested to bring the following Neutron commands to OSC:

  floatingip-associate Create a mapping between a floating IP and a fixed IP.
  floatingip-disassociate Remove a mapping from a floating IP to a fixed IP.

Revision history for this message
Yushiro FURUKAWA (y-furukawa-2) wrote :

I was also hit an error with following command:

$ openstack server add floating ip demo1 $(openstack floating ip create public1 -f value -c floating_ip_address) --debug

[Error]
..(snip)...
add_floating_ip
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 267, in take_action
    server.add_floating_ip(parsed_args.ip_address,
  File "/usr/local/lib/python2.7/dist-packages/novaclient/base.py", line 180, in __getattr__
    raise AttributeError(k)
AttributeError: add_floating_ip
clean_up AddFloatingIP: add_floating_ip
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 134, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 169, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 267, in take_action
    server.add_floating_ip(parsed_args.ip_address,
  File "/usr/local/lib/python2.7/dist-packages/novaclient/base.py", line 180, in __getattr__
    raise AttributeError(k)
AttributeError: add_floating_ip

Revision history for this message
Holosian (holosian) wrote :

Im hitting same problem:here is my ticket with more information: https://bugs.launchpad.net/python-openstackclient/+bug/1747721

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.