Debian Codegraph @

neutron_lib/api/definitions/data_plane_status.py

raw
1 # Copyright (c) 2017 NEC Corporation. All rights reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
13 # under the License.
14
15 from neutron_lib.api.definitions import port
16 from neutron_lib import constants
17
18
19 VALID_VALUES = [None, constants.ACTIVE, constants.DOWN]
20
21 # The alias of the extension.
22 ALIAS = 'data-plane-status'
23
24 # Whether or not this extension is simply signaling behavior to the user
25 # or it actively modifies the attribute map.
26 IS_SHIM_EXTENSION = False
27
28 # Whether the extension is marking the adoption of standardattr model for
29 # legacy resources, or introducing new standardattr attributes. False or
30 # None if the standardattr model is adopted since the introduction of
31 # resource extension.
32 # If this is True, the alias for the extension should be prefixed with
33 # 'standard-attr-'.
34 IS_STANDARD_ATTR_EXTENSION = False
35
36 # The name of the extension.
37 NAME = 'Port data plane status extension'
38
39 # The description of the extension.
40 DESCRIPTION = "Expose status of underlying data plane"
41
42 # A timestamp of when the extension was introduced.
43 UPDATED_TIMESTAMP = "2017-01-24T10:00:00-00:00"
44
45 # The name of the resource introduced or being extended.
46 RESOURCE_NAME = port.RESOURCE_NAME
47
48 # The plural for the resource introduced or being extended.
49 COLLECTION_NAME = port.COLLECTION_NAME
50
51 # The specific resources and/or attributes for the extension (optional).
52 DATA_PLANE_STATUS = 'data_plane_status'
53
54 # The resource attribute map for the extension.
55 RESOURCE_ATTRIBUTE_MAP = {
56 COLLECTION_NAME: {
57 DATA_PLANE_STATUS: {'allow_post': False, 'allow_put': True,
58 'default': constants.ATTR_NOT_SPECIFIED,
59 'validate': {'type:values': VALID_VALUES},
60 'is_visible': True,
61 'enforce_policy': True, }
62 },
63 }
64
65 # The subresource attribute map for the extension.
66 SUB_RESOURCE_ATTRIBUTE_MAP = {
67 }
68
69 # The action map.
70 ACTION_MAP = {
71 }
72
73 # The action status.
74 ACTION_STATUS = {
75 }
76
77 # The list of required extensions.
78 REQUIRED_EXTENSIONS = [
79 ]
80
81 # The list of optional extensions.
82 OPTIONAL_EXTENSIONS = [
83 ]