Debian Codegraph @

neutron_lib/api/definitions/subnet_dns_publish_fixed_ip.py

raw
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12
13 from neutron_lib.api import converters
14 from neutron_lib.api.definitions import dns_domain_ports
15 from neutron_lib.api.definitions import subnet
16
17 DNS_PUBLISH_FIXED_IP = 'dns_publish_fixed_ip'
18
19 # The alias of the extension.
20 ALIAS = 'subnet-dns-publish-fixed-ip'
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 = 'Subnet DNS publish fixed IP'
36
37 # The description of the extension.
38 DESCRIPTION = 'Support choosing to publish DNS records for IPs from a subnet'
39
40 # A timestamp of when the extension was introduced.
41 UPDATED_TIMESTAMP = "2019-05-24T10:00:00-00:00"
42
43 # The name of the resource introduced or being extended.
44 RESOURCE_NAME = subnet.RESOURCE_NAME
45
46 # The plural for the resource introduced or being extended.
47 COLLECTION_NAME = subnet.COLLECTION_NAME
48
49 # The resource attribute map for the extension.
50 RESOURCE_ATTRIBUTE_MAP = {
51 COLLECTION_NAME: {
52 DNS_PUBLISH_FIXED_IP: {
53 'allow_post': True, 'allow_put': True,
54 'default': False,
55 'convert_to': converters.convert_to_boolean,
56 'is_visible': True
57 }
58 }
59 }
60
61 # The subresource attribute map for the extension.
62 SUB_RESOURCE_ATTRIBUTE_MAP = {
63 }
64
65 # The action map.
66 ACTION_MAP = {
67 }
68
69 # The action status.
70 ACTION_STATUS = {
71 }
72
73 # The list of required extensions.
74 REQUIRED_EXTENSIONS = [
75 dns_domain_ports.ALIAS,
76 ]
77
78 # The list of optional extensions.
79 OPTIONAL_EXTENSIONS = [
80 ]