Debian Codegraph @

neutron_lib/api/definitions/trunk_details.py

raw
1 # 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.api.definitions import trunk
17 from neutron_lib import constants
18
19
20 # The alias of the extension.
21 ALIAS = 'trunk-details'
22
23 # Whether or not this extension is simply signaling behavior to the user
24 # or it actively modifies the attribute map.
25 IS_SHIM_EXTENSION = False
26
27 # Whether the extension is marking the adoption of standardattr model for
28 # legacy resources, or introducing new standardattr attributes. False or
29 # None if the standardattr model is adopted since the introduction of
30 # resource extension.
31 # If this is True, the alias for the extension should be prefixed with
32 # 'standard-attr-'.
33 IS_STANDARD_ATTR_EXTENSION = False
34
35 # The name of the extension.
36 NAME = 'Trunk port details'
37
38 # The description of the extension.
39 DESCRIPTION = "Expose trunk port details"
40
41 # A timestamp of when the extension was last updated.
42 UPDATED_TIMESTAMP = "2016-01-01T10:00:00-00:00"
43 # TODO(armax): to be removed when review
44 # https://review.opendev.org/#/c/484058/ merges
45 TIMESTAMP = UPDATED_TIMESTAMP
46
47 # The name of the resource introduced or being extended.
48 RESOURCE_NAME = port.RESOURCE_NAME
49
50 # The plural for the resource introduced or being extended.
51 COLLECTION_NAME = port.COLLECTION_NAME
52
53 # The specific resources and/or attributes for the extension (optional).
54 TRUNK_DETAILS = 'trunk_details'
55
56 # The resource attribute map for the extension.
57 RESOURCE_ATTRIBUTE_MAP = {
58 COLLECTION_NAME: {TRUNK_DETAILS: {'allow_post': False, 'allow_put': False,
59 'default': constants.ATTR_NOT_SPECIFIED,
60 'is_visible': True,
61 'enforce_policy': True,
62 'required_by_policy': True}},
63 }
64
65 # The subresource attribute map for the extension.
66 SUB_RESOURCE_ATTRIBUTE_MAP = None
67
68 # The action map.
69 ACTION_MAP = {}
70
71 # The action status.
72 ACTION_STATUS = {
73 }
74
75 # The list of required extensions.
76 REQUIRED_EXTENSIONS = [trunk.ALIAS]
77
78 # The list of optional extensions.
79 OPTIONAL_EXTENSIONS = []