summaryrefslogtreecommitdiff
path: root/openstackclient/network
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-12-24 12:00:03 +0000
committerGerrit Code Review <review@openstack.org>2018-12-24 12:00:03 +0000
commit7b72fb816f7727fae0c6fe6d32aaa53ff82d4c69 (patch)
tree9515135632917183e2167ad8cdb11d511cf3b832 /openstackclient/network
parent4eab8364413ab26f40446a348d7be06fe61c7f45 (diff)
parentc82f4237e59dd61f180b2bfbd3383c6540cd6cef (diff)
downloadpython-openstackclient-7b72fb816f7727fae0c6fe6d32aaa53ff82d4c69.tar.gz
Merge "Support enable/disable uplink status propagation"
Diffstat (limited to 'openstackclient/network')
-rw-r--r--openstackclient/network/v2/port.py18
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>',