Misalignment with extra-dhcp-options between neutronclient & openstackclient

Bug #1938575 reported by Eduardo Olivares
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Low
Unassigned

Bug Description

The SetPort class from the openstack client does not support --extra-dhcp-option [1]
(overcloud) $ openstack port set --extra-dhcp-option name=mtu,value=1700,ip-version=4 port-test-202
usage: openstack port set [-h] [--description <description>]
                          [--device <device-id>] [--mac-address <mac-address>]
                          [--device-owner <device-owner>]
                          [--vnic-type <vnic-type>] [--host <host-id>]
                          [--dns-domain dns-domain] [--dns-name <dns-name>]
                          [--enable | --disable] [--name <name>]
                          [--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
                          [--no-fixed-ip]
                          [--binding-profile <binding-profile>]
                          [--no-binding-profile] [--qos-policy <qos-policy>]
                          [--security-group <security-group>]
                          [--no-security-group]
                          [--enable-port-security | --disable-port-security]
                          [--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]]
                          [--no-allowed-address]
                          [--data-plane-status <status>] [--tag <tag>]
                          [--no-tag]
                          <port>
openstack port set: error: unrecognized arguments: --extra-dhcp-option port-test-202

The UpdatePort class from the neutron client supports --extra-dhcp-opt [2]
This is aligned with the neutron API [3]
(overcloud) $ neutron port-update port-test-202 --extra-dhcp-opt opt_name=mtu,opt_value=1750,ip_version=4
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
Updated port: port-test-202
(overcloud) $ neutron port-show port-test-202 | grep mtu
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
| | {"opt_name": "mtu", "opt_value": "1750", "ip_version": 4} |

[1] https://opendev.org/openstack/python-openstackclient/src/commit/ed87f7949ef1ef580ed71b9820e16823c0466472/openstackclient/network/v2/port.py#L703
[2] https://github.com/openstack/python-neutronclient/blob/2f047b15957308e84dcb72baee3415b8bf5a470a/neutronclient/neutron/v2_0/port.py#L305
[3] https://docs.openstack.org/api-ref/network/v2/?expanded=update-port-detail#update-port

description: updated
Changed in neutron:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Slawek Kaplonski (slaweq) wrote :

This seems for me like lack of feature in the openstackclient. OSC uses storyboard to track issues. I opened bug in storyboard https://storyboard.openstack.org/#!/story/2009095 and I'm closing this one here.

Changed in neutron:
status: Triaged → Invalid
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.