diff options
| author | Hongbin Lu <hongbin.lu@huawei.com> | 2018-07-27 16:41:45 -0400 |
|---|---|---|
| committer | Hongbin Lu <hongbin.lu@huawei.com> | 2018-12-05 21:07:07 +0000 |
| commit | c82f4237e59dd61f180b2bfbd3383c6540cd6cef (patch) | |
| tree | 8d3d22e24cfb9ca0249831b933187f50b6866557 /openstackclient/network | |
| parent | 8be53a50e5278281640b5023c4d8c4b28da22cb9 (diff) | |
| download | python-openstackclient-c82f4237e59dd61f180b2bfbd3383c6540cd6cef.tar.gz | |
Support enable/disable uplink status propagation
Add options to enable/disable uplink status propagation on creating
a neutron port.
Related patches:
* neutron: https://review.openstack.org/#/c/571899/
* openstacksdk: https://review.openstack.org/#/c/586687/
Depends-On: https://review.openstack.org/#/c/586687/
Change-Id: I095a98fc5f5aee62d979a16b3cd79d91ec3b9ddb
Related-Bug: #1722720
Diffstat (limited to 'openstackclient/network')
| -rw-r--r-- | openstackclient/network/v2/port.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/openstackclient/network/v2/port.py b/openstackclient/network/v2/port.py index 0d276d9d..1001e6cf 100644 --- a/openstackclient/network/v2/port.py +++ b/openstackclient/network/v2/port.py @@ -163,6 +163,13 @@ def _get_attrs(client_manager, parsed_args): attrs['qos_policy_id'] = client_manager.network.find_qos_policy( parsed_args.qos_policy, ignore_missing=False).id + if ('enable_uplink_status_propagation' in parsed_args and + parsed_args.enable_uplink_status_propagation): + attrs['propagate_uplink_status'] = True + if ('disable_uplink_status_propagation' in parsed_args and + parsed_args.disable_uplink_status_propagation): + attrs['propagate_uplink_status'] = False + return attrs @@ -349,6 +356,17 @@ class CreatePort(command.ShowOne): action='store_true', help=_("Disable port") ) + uplink_status_group = parser.add_mutually_exclusive_group() + uplink_status_group.add_argument( + '--enable-uplink-status-propagation', + action='store_true', + help=_("Enable uplink status propagate") + ) + uplink_status_group.add_argument( + '--disable-uplink-status-propagation', + action='store_true', + help=_("Disable uplink status propagate (default)") + ) parser.add_argument( '--project', metavar='<project>', |
