Debian Codegraph @

neutron_lib/api/definitions/subnet_segmentid_writable.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 import copy
16
17 from neutron_lib.api.definitions import segment
18 from neutron_lib.api.definitions import subnet
19
20
21 # The alias of the extension.
22 ALIAS = 'subnet-segmentid-writable'
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 = 'Subnet SegmentID (writable)'
38
39 # A prefix for API resources. An empty prefix means that the API is going
40 # to be exposed at the v2/ level as any other core resource.
41 API_PREFIX = ''
42
43 # The description of the extension.
44 DESCRIPTION = (
45 "Provides a writable segment_id attribute for a subnet resource.")
46
47 # A timestamp of when the extension was introduced.
48 UPDATED_TIMESTAMP = "2018-03-12T00:00:00-00:00"
49
50
51 segment_id_attr_info = copy.deepcopy(
52 segment.RESOURCE_ATTRIBUTE_MAP[
53 subnet.COLLECTION_NAME][segment.SEGMENT_ID])
54 segment_id_attr_info['allow_put'] = True
55
56 RESOURCE_ATTRIBUTE_MAP = {
57 subnet.COLLECTION_NAME: {
58 segment.SEGMENT_ID: segment_id_attr_info
59 }
60 }
61
62
63 # The subresource attribute map for the extension. It adds child resources
64 # to main extension's resource. The subresource map must have a parent and
65 # a parameters entry. If an extension does not need such a map, None can
66 # be specified (mandatory).
67 SUB_RESOURCE_ATTRIBUTE_MAP = {}
68
69 # The action map: it associates verbs with methods to be performed on
70 # the API resource.
71 ACTION_MAP = {}
72
73 # The action status.
74 ACTION_STATUS = {
75 }
76
77 # The list of required extensions.
78 REQUIRED_EXTENSIONS = [segment.ALIAS]
79
80 # The list of optional extensions.
81 OPTIONAL_EXTENSIONS = []