openstackclient cannot update mac address of neutron port

Bug #1670707 reported by Bence Romsics on 2017-03-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Bence Romsics

Bug Description

openstackclient cannot update the MAC address of a neutron port, while this is allowed in neutron API and neutronclient can also do it.

Please see the API definition here:
https://developer.openstack.org/api-ref/networking/v2/?expanded=update-port-detail#update-port

And here:
https://github.com/openstack/neutron/blob/49b269adc6e52b6fed6195d457556f68f17115cb/neutron/api/v2/attributes.py#L108

neutron port-create private --name port0
neutron port-update port0 --mac-address 11:22:33:44:55:66
# succeeds

openstack port create port1 --network private
openstack port set port1 --mac-address 11:22:33:44:55:66
# fails: openstack port set: error: unrecognized arguments: --mac-address 11:22:33:44:55:66

openstackclient commit: ada6abb (2.6.1.dev14)
neutronclient commit: 8369c4e
neutron commit: 49b269a

A patch is on the way to gerrit.

Bence Romsics (bence-romsics) wrote :

Oops, first I tested with a really old version of openstackclient, sorry.

But it seems the recent master still behaves the same:

$ openstack port set port1 --mac-address 11:22:33:44:55:66
openstack port set: error: unrecognized arguments: --mac-address 11:22:33:44:55:66

openstackclient commit: c0a23b8 (3.9.0)

Changed in python-openstackclient:
assignee: nobody → Bence Romsics (bence-romsics)
tags: added: network
Changed in python-openstackclient:
status: New → In Progress

Reviewed: https://review.openstack.org/442543
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=f1345dc06f91177ced17f102bcdaaa126fe12568
Submitter: Jenkins
Branch: master

commit f1345dc06f91177ced17f102bcdaaa126fe12568
Author: Bence Romsics <email address hidden>
Date: Tue Mar 7 15:54:31 2017 +0100

    Make MAC address of port updatable

    openstackclient does not allow the update of a port's MAC address.
    However this is possible in neutron API (though by default policy
    it is an admin-only operation). Allow it in openstackclient too.

    Change-Id: Ibd9e0a6fbd1d0d461b8a8daee24dbb7c3f929df6
    Closes-Bug: #1670707

Changed in python-openstackclient:
status: In Progress → Fix Released

This issue was fixed in the openstack/python-openstackclient 3.10.0 release.

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

Other bug subscribers