Debian Codegraph @

neutron_lib/api/definitions/fip_pf_port_range.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.definitions import fip_pf_description as pfw_desc
14 from neutron_lib.api.definitions import floating_ip_port_forwarding as pfw
15
16 ALIAS = 'floating-ip-port-forwarding-port-ranges'
17 IS_SHIM_EXTENSION = False
18 IS_STANDARD_ATTR_EXTENSION = False
19 NAME = 'Floating IP Port Forwarding support port ranges'
20 DESCRIPTION = 'Add support to port ranges'
21 UPDATED_TIMESTAMP = '2020-07-01T10:00:00-00:00'
22 EXTERNAL_PORT_RANGE = 'external_port_range'
23 INTERNAL_PORT_RANGE = 'internal_port_range'
24 RESOURCE_ATTRIBUTE_MAP = {}
25 SUB_RESOURCE_ATTRIBUTE_MAP = {
26 pfw.COLLECTION_NAME: {
27 'parameters': {
28 EXTERNAL_PORT_RANGE: {
29 'allow_post': True, 'allow_put': True,
30 'validate': {'type:port_range': [1, 65535]},
31 'is_visible': True,
32 'is_sort_key': True,
33 'is_filter': True,
34 'default': None},
35 INTERNAL_PORT_RANGE: {
36 'allow_post': True, 'allow_put': True,
37 'validate': {'type:port_range': [1, 65535]},
38 'is_visible': True,
39 'default': None},
40 pfw.EXTERNAL_PORT: {
41 'allow_post': True, 'allow_put': True,
42 'validate': {'type:range_or_none': [1, 65535]},
43 'is_visible': True,
44 'is_sort_key': True,
45 'is_filter': True,
46 'default': None},
47 pfw.INTERNAL_PORT: {
48 'allow_post': True, 'allow_put': True,
49 'validate': {'type:range_or_none': [1, 65535]},
50 'is_visible': True,
51 'default': None},
52 }
53 }
54 }
55 ACTION_MAP = {}
56 REQUIRED_EXTENSIONS = [pfw.ALIAS]
57 OPTIONAL_EXTENSIONS = [pfw_desc.ALIAS]
58 ACTION_STATUS = {}