diff options
author | Carlos Goncalves <carlos.goncalves@neclab.eu> | 2017-06-26 11:16:00 +0200 |
---|---|---|
committer | Carlos Goncalves <carlos.goncalves@neclab.eu> | 2017-07-19 10:04:32 +0200 |
commit | d3ff8f323b2827dc14ee550a99a5661fee2294cb (patch) | |
tree | 24796964ed69bdd94b897b23ec3527866cb2067e /build/patches/neutron_openstackclient_dps.patch | |
parent | 68bb8c986bfdca528a06e18e58507b4750fdf40e (diff) |
Backport Neutron port data plane status
JIRA: APEX-444
JIRA: DOCTOR-102
Change-Id: Idc40aa549fb1aae077a9e6b84225833a9c7c5b72
Signed-off-by: Carlos Goncalves <carlos.goncalves@neclab.eu>
Diffstat (limited to 'build/patches/neutron_openstackclient_dps.patch')
-rw-r--r-- | build/patches/neutron_openstackclient_dps.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/build/patches/neutron_openstackclient_dps.patch b/build/patches/neutron_openstackclient_dps.patch new file mode 100644 index 00000000..6c743f91 --- /dev/null +++ b/build/patches/neutron_openstackclient_dps.patch @@ -0,0 +1,65 @@ +From 1ae904a4912494b3d0ac87f22aaf958129744548 Mon Sep 17 00:00:00 2001 +From: Carlos Goncalves <carlos.goncalves@neclab.eu> +Date: Wed, 18 Jan 2017 11:16:39 +0000 +Subject: [PATCH] Add 'data_plane_status' option to Port classes + +Adds 'data_plane_status' option to SetPort and UnsetPort classes. + +Closes-Bug: #1684989 +Change-Id: I26e23b551afb8c37e6babdea1655efb7c5c6873b +--- + openstackclient/network/v2/port.py | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/openstackclient/network/v2/port.py b/openstackclient/network/v2/port.py +index 42291bf2..1409a194 100644 +--- a/openstackclient/network/v2/port.py ++++ b/openstackclient/network/v2/port.py +@@ -632,6 +632,14 @@ + "(Specify both --allowed-address and --no-allowed-address" + "to overwrite the current allowed-address pairs)") + ) ++ parser.add_argument( ++ '--data-plane-status', ++ metavar='<status>', ++ choices=['ACTIVE', 'DOWN'], ++ help=_("Set data plane status of this port (ACTIVE | DOWN). " ++ "Unset it to None with the 'port unset' command " ++ "(requires data plane status extension)") ++ ) + return parser + + def take_action(self, parsed_args): +@@ -684,6 +692,9 @@ + elif parsed_args.no_allowed_address_pair: + attrs['allowed_address_pairs'] = [] + ++ if parsed_args.data_plane_status: ++ attrs['data_plane_status'] = parsed_args.data_plane_status ++ + client.update_port(obj, **attrs) + + +@@ -756,6 +767,11 @@ + "[,mac-address=<mac-address>] (repeat option to set " + "multiple allowed-address pairs)") + ) ++ parser.add_argument( ++ '--data-plane-status', ++ action='store_true', ++ help=_("Clear existing information of data plane status") ++ ) + + return parser + +@@ -805,6 +821,8 @@ + msg = _("Port does not contain allowed-address-pair %s") % addr + raise exceptions.CommandError(msg) + attrs['allowed_address_pairs'] = tmp_addr_pairs ++ if parsed_args.data_plane_status: ++ attrs['data_plane_status'] = None + + if attrs: + client.update_port(obj, **attrs) +-- +2.12.3 |