Debian Codegraph @

neutron_lib/api/definitions/l3_ndp_proxy.py

raw
1 # Copyright (c) 2020 Troila.
2 # All rights reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
14 # under the License.
15
16 from neutron_lib.api.definitions import l3
17 from neutron_lib.db import constants as db_const
18
19 # The alias of the extension.
20 ALIAS = 'l3-ndp-proxy'
21
22 # Whether or not this extension is simply signaling behavior to the user
23 # or it actively modifies the attribute map.
24 IS_SHIM_EXTENSION = False
25
26 # Whether the extension is marking the adoption of standardattr model for
27 # legacy resources, or introducing new standardattr attributes. False or
28 # None if the standardattr model is adopted since the introduction of
29 # resource extension.
30 # If this is True, the alias for the extension should be prefixed with
31 # 'standard-attr-'.
32 IS_STANDARD_ATTR_EXTENSION = False
33
34 # The name of the extension.
35 NAME = 'L3 NDP Proxy'
36
37 # A prefix for API resources. An empty prefix means that the API is going
38 # to be exposed at the v2/ level as any other core resource.
39 API_PREFIX = ''
40
41 # The description of the extension.
42 DESCRIPTION = "Router support for L3 NDP proxy."
43
44 # A timestamp of when the extension was introduced.
45 UPDATED_TIMESTAMP = "2021-06-29T10:00:00-00:00"
46
47 # The name of the resource.
48 RESOURCE_NAME = 'ndp_proxy'
49
50 # The plural for the resource.
51 COLLECTION_NAME = 'ndp_proxies'
52
53 ID = 'id'
54 NAME = 'name'
55 PROJECT_ID = 'project_id'
56 ROUTER_ID = 'router_id'
57 PORT_ID = 'port_id'
58 IP_ADDRESS = 'ip_address'
59 DESCRIPTION = 'description'
60
61 # The resource attribute map for the extension.
62 RESOURCE_ATTRIBUTE_MAP = {
63 COLLECTION_NAME: {
64 ID: {'allow_post': False,
65 'allow_put': False,
66 'validate': {'type:uuid': None},
67 'is_visible': True,
68 'is_sort_key': True,
69 'primary_key': True},
70 NAME: {'allow_post': True,
71 'allow_put': True,
72 'validate': {'type:string': db_const.NAME_FIELD_SIZE},
73 'is_filter': True,
74 'is_sort_key': True,
75 'is_visible': True, 'default': ''},
76 PROJECT_ID: {'allow_post': True,
77 'allow_put': False,
78 'required_by_policy': True,
79 'validate': {
80 'type:string': db_const.PROJECT_ID_FIELD_SIZE},
81 'is_sort_key': True,
82 'is_visible': True},
83 ROUTER_ID: {'allow_post': True,
84 'allow_put': False,
85 'validate': {'type:uuid': None},
86 'is_sort_key': True,
87 'is_visible': True},
88 PORT_ID: {'allow_post': True,
89 'allow_put': False,
90 'validate': {'type:uuid': None},
91 'is_sort_key': True,
92 'is_visible': True},
93 IP_ADDRESS: {'allow_post': True,
94 'allow_put': False,
95 'default': None,
96 'validate': {
97 'type:ip_address_or_none': None},
98 'is_sort_key': True,
99 'is_visible': True},
100 DESCRIPTION: {'allow_post': True,
101 'allow_put': True,
102 'default': '',
103 'validate': {'type:string':
104 db_const.LONG_DESCRIPTION_FIELD_SIZE},
105 'is_visible': True}
106 }
107 }
108
109 # The subresource attribute map for the extension. It adds child resources
110 # to main extension's resource. The subresource map must have a parent and
111 # a parameters entry. If an extension does not need such a map, None can
112 # be specified (mandatory).
113 SUB_RESOURCE_ATTRIBUTE_MAP = {}
114
115 # The action map: it associates verbs with methods to be performed on
116 # the API resource.
117 ACTION_MAP = {
118 }
119
120 # The action status.
121 ACTION_STATUS = {
122 }
123
124 # The list of required extensions.
125 REQUIRED_EXTENSIONS = [l3.ALIAS]
126
127 # The list of optional extensions.
128 OPTIONAL_EXTENSIONS = []