Enable nosdn-fdio scenarios for Fraser release
[apex.git] / build / patches / neutron_lib_dps.patch
1 From ee74cb2a5ccdc13e8bf137d7387f01c6b202c150 Mon Sep 17 00:00:00 2001
2 From: Carlos Goncalves <carlos.goncalves@neclab.eu>
3 Date: Tue, 24 Jan 2017 21:52:27 +0000
4 Subject: [PATCH] API definition and reference for data plane status extension
5
6 Related-Bug: #1598081
7 Related-Bug: #1575146
8
9 Partial-Implements: blueprint port-data-plane-status
10
11 Change-Id: I04eef902b3310f799b1ce7ea44ed7cf77c74da04
12 ---
13  neutron_lib/api/definitions/base.py              |  1 +
14  neutron_lib/api/definitions/data_plane_status.py | 78 ++++++++++++++++++++++++
15  2 files changed, 79 insertions(+)
16  create mode 100644 neutron_lib/api/definitions/data_plane_status.py
17
18 diff --git a/neutron_lib/api/definitions/base.py b/neutron_lib/api/definitions/base.py
19 index 6fbcbfa..38f183c 100644
20 --- a/neutron_lib/api/definitions/base.py
21 +++ b/neutron_lib/api/definitions/base.py
22 @@ -44,6 +44,7 @@ KNOWN_EXTENSIONS = (
23      'auto-allocated-topology',
24      'availability_zone',
25      'binding',
26 +    'data-plane-status',
27      'default-subnetpools',
28      'dhcp_agent_scheduler',
29      'dns-integration',
30 diff --git a/neutron_lib/api/definitions/data_plane_status.py b/neutron_lib/api/definitions/data_plane_status.py
31 new file mode 100644
32 index 0000000..5bcbf60
33 --- /dev/null
34 +++ b/neutron_lib/api/definitions/data_plane_status.py
35 @@ -0,0 +1,78 @@
36 +# Copyright (c) 2017 NEC Corporation.  All rights reserved.
37 +#
38 +#    Licensed under the Apache License, Version 2.0 (the "License"); you may
39 +#    not use this file except in compliance with the License. You may obtain
40 +#    a copy of the License at
41 +#
42 +#         http://www.apache.org/licenses/LICENSE-2.0
43 +#
44 +#    Unless required by applicable law or agreed to in writing, software
45 +#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
46 +#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
47 +#    License for the specific language governing permissions and limitations
48 +#    under the License.
49 +
50 +from neutron_lib import constants
51 +
52 +
53 +VALID_VALUES = [None, constants.ACTIVE, constants.DOWN]
54 +
55 +# The alias of the extension.
56 +ALIAS = 'data-plane-status'
57 +
58 +# Whether or not this extension is simply signaling behavior to the user
59 +# or it actively modifies the attribute map.
60 +IS_SHIM_EXTENSION = False
61 +
62 +# Whether the extension is marking the adoption of standardattr model for
63 +# legacy resources, or introducing new standardattr attributes. False or
64 +# None if the standardattr model is adopted since the introduction of
65 +# resource extension.
66 +# If this is True, the alias for the extension should be prefixed with
67 +# 'standard-attr-'.
68 +IS_STANDARD_ATTR_EXTENSION = False
69 +
70 +# The name of the extension.
71 +NAME = 'Port data plane status extension'
72 +
73 +# The description of the extension.
74 +DESCRIPTION = "Expose status of underlying data plane"
75 +
76 +# A timestamp of when the extension was introduced.
77 +UPDATED_TIMESTAMP = "2017-01-24T10:00:00-00:00"
78 +
79 +# The name of the resource introduced or being extended.
80 +RESOURCE_NAME = 'port'
81 +
82 +# The plural for the resource introduced or being extended.
83 +COLLECTION_NAME = 'ports'
84 +
85 +# The specific resources and/or attributes for the extension (optional).
86 +DATA_PLANE_STATUS = 'data_plane_status'
87 +
88 +# The resource attribute map for the extension.
89 +RESOURCE_ATTRIBUTE_MAP = {
90 +    COLLECTION_NAME: {
91 +        DATA_PLANE_STATUS: {'allow_post': False, 'allow_put': True,
92 +                            'default': constants.ATTR_NOT_SPECIFIED,
93 +                            'validate': {'type:values': VALID_VALUES},
94 +                            'is_visible': True,
95 +                            'enforce_policy': True, }
96 +    },
97 +}
98 +
99 +# The subresource attribute map for the extension.
100 +SUB_RESOURCE_ATTRIBUTE_MAP = {
101 +}
102 +
103 +# The action map.
104 +ACTION_MAP = {
105 +}
106 +
107 +# The list of required extensions.
108 +REQUIRED_EXTENSIONS = [
109 +]
110 +
111 +# The list of optional extensions.
112 +OPTIONAL_EXTENSIONS = [
113 +]
114 -- 
115 2.12.3
116