Applies Tacker upstream patches and fixes fernet dir perms
[apex.git] / build / patches / neutron_openstackclient_dps.patch
1 From 1ae904a4912494b3d0ac87f22aaf958129744548 Mon Sep 17 00:00:00 2001
2 From: Carlos Goncalves <carlos.goncalves@neclab.eu>
3 Date: Wed, 18 Jan 2017 11:16:39 +0000
4 Subject: [PATCH] Add 'data_plane_status' option to Port classes
5
6 Adds 'data_plane_status' option to SetPort and UnsetPort classes.
7
8 Closes-Bug: #1684989
9 Change-Id: I26e23b551afb8c37e6babdea1655efb7c5c6873b
10 ---
11  openstackclient/network/v2/port.py | 18 ++++++++++++++++++
12  1 file changed, 18 insertions(+)
13
14 diff --git a/openstackclient/network/v2/port.py b/openstackclient/network/v2/port.py
15 index 42291bf2..1409a194 100644
16 --- a/openstackclient/network/v2/port.py
17 +++ b/openstackclient/network/v2/port.py
18 @@ -632,6 +632,14 @@
19                     "(Specify both --allowed-address and --no-allowed-address"
20                     "to overwrite the current allowed-address pairs)")
21          )
22 +        parser.add_argument(
23 +            '--data-plane-status',
24 +            metavar='<status>',
25 +            choices=['ACTIVE', 'DOWN'],
26 +            help=_("Set data plane status of this port (ACTIVE | DOWN). "
27 +                   "Unset it to None with the 'port unset' command "
28 +                   "(requires data plane status extension)")
29 +        )
30          return parser
31
32      def take_action(self, parsed_args):
33 @@ -684,6 +692,9 @@
34          elif parsed_args.no_allowed_address_pair:
35              attrs['allowed_address_pairs'] = []
36
37 +        if parsed_args.data_plane_status:
38 +            attrs['data_plane_status'] = parsed_args.data_plane_status
39 +
40          client.update_port(obj, **attrs)
41
42
43 @@ -756,6 +767,11 @@
44                     "[,mac-address=<mac-address>] (repeat option to set "
45                     "multiple allowed-address pairs)")
46          )
47 +        parser.add_argument(
48 +            '--data-plane-status',
49 +            action='store_true',
50 +            help=_("Clear existing information of data plane status")
51 +        )
52
53          return parser
54
55 @@ -805,6 +821,8 @@
56                  msg = _("Port does not contain allowed-address-pair %s") % addr
57                  raise exceptions.CommandError(msg)
58              attrs['allowed_address_pairs'] = tmp_addr_pairs
59 +        if parsed_args.data_plane_status:
60 +            attrs['data_plane_status'] = None
61
62          if attrs:
63              client.update_port(obj, **attrs)
64 -- 
65 2.12.3