Bug 1378531 - RFE: IPV6 command for neutron port-update --allowed-address-pairs
Summary: RFE: IPV6 command for neutron port-update --allowed-address-pairs
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-neutronclient
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 7.0 (Kilo)
Assignee: Bernard Cafarelli
QA Contact: Toni Freger
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-22 16:36 UTC by Jeremy
Modified: 2019-12-16 06:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-23 14:34:29 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jeremy 2016-09-22 16:36:33 UTC
Description of problem: Need a way to add allowed address pairs for IPV6 addresses.


Version-Release number of selected component (if applicable):
openstack-neutron-2015.1.0-16.el7ost.noarch
python-neutron-2015.1.0-16.el7ost.noarch


Additional info:
Attempting to add multiple or single ipv6 ip_address does not work. or overwrites the ipv4 address:
[hsiaand@nj51labadm6v ~]$ neutron port-update 7aed2fbd-9d1c-4c39-b36d-8cc4873dc554 --allowed-address-pairs type=dict list=true mac_address=fa:16:3e:51:bc:bb,ip_address=0.0.0.0/0,ip_address=::/0
Updated port: 7aed2fbd-9d1c-4c39-b36d-8cc4873dc554
[hsiaand@nj51labadm6v ~]$ neutron  port-show 7aed2fbd-9d1c-4c39-b36d-8cc4873dc554
+-----------------------+---------------------------------------------------------------------------------------+
| Field                 | Value                                                                                 |
+-----------------------+---------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                  |
| allowed_address_pairs | {"ip_address": "::/0", "mac_address": "fa:16:3e:51:bc:bb"}                            |
| binding:vnic_type     | normal                                                                                |
| device_id             | 9644fa16-269a-4a53-943e-50b6dcf6d841                                                  |
| device_owner          | compute:None                                                                          |
| extra_dhcp_opts       |                                                                                       |
| fixed_ips             | {"subnet_id": "57f7d23d-78b5-411f-859d-a039233f583b", "ip_address": "192.168.225.11"} |
| id                    | 7aed2fbd-9d1c-4c39-b36d-8cc4873dc554                                                  |
| mac_address           | fa:16:3e:51:bc:bb                                                                     |
| name                  |                                                                                       |
| network_id            | b6acca69-36fd-4d11-ba77-1f267d26c56f                                                  |
| security_groups       | 4107ceb4-1139-4efe-bc52-f8344f89f94d                                                  |
| status                | ACTIVE                                                                                |
| tenant_id             | 5bfb5141ed6a48e69bb5f63698d7bed1                                                      |

Comment 1 Assaf Muller 2016-09-22 16:42:48 UTC
@Bernard, can you please verify if it's currently possible to add IPv6 allowed address pairs, and if anything changed in this regard from Kilo to master?

Comment 3 Bernard Cafarelli 2016-09-23 12:51:05 UTC
This is related to how to enter allowed address pairs parameters, you would get the same behavior here with two IPv4 adresses

What you enter is actually a mac (optional)/IP pair where the "," separator is used. For additional (pair) parameters, separate with a space:

$ neutron port-update b17865ee-b8c2-4d79-b5f8-034e61196346 --allowed-address-pairs type=dict list=true mac_address=fa:16:3e:b9:47:52,ip_address=0.0.0.0/0 ip_address=127.0.0.1/32 mac_address=fa:16:3e:b9:47:52,ip_address=::/0
This will add the 3 tuples {"ip_address": "0.0.0.0/0", "mac_address": "fa:16:3e:b9:47:52"}, {"ip_address": "127.0.0.1/32", "mac_address": "fa:16:3e:b9:47:52"}, {"ip_address": "::/0", "mac_address": "fa:16:3e:b9:47:52"}

Also, I just tested on OSP 7 and this also works on this version (with the same syntax)

So the customer command should be something like:
$ neutron port-update 7aed2fbd-9d1c-4c39-b36d-8cc4873dc554 --allowed-address-pairs type=dict list=true mac_address=fa:16:3e:51:bc:bb,ip_address=0.0.0.0/0 mac_address=fa:16:3e:51:bc:bb,ip_address=::/0

Comment 4 Jeremy 2016-09-23 14:34:29 UTC
Thanks, that works. we can close this BZ.


Note You need to log in before you can comment on or make changes to this bug.