| 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 bgp |
| 14 |
from neutron_lib import constants |
| 15 |
|
| 16 |
|
| 17 |
ALIAS = 'bgp_4byte_asn' |
| 18 |
IS_SHIM_EXTENSION = False |
| 19 |
IS_STANDARD_ATTR_EXTENSION = False |
| 20 |
NAME = "BGP 4-byte AS numbers" |
| 21 |
DESCRIPTION = "Support bgp 4-byte AS number" |
| 22 |
UPDATED_TIMESTAMP = '2017-09-07T00:00:00-00:00' |
| 23 |
|
| 24 |
|
| 25 |
RESOURCE_ATTRIBUTE_MAP = { |
| 26 |
'bgp-speakers': { |
| 27 |
'local_as': {'allow_post': True, 'allow_put': False, |
| 28 |
'validate': {'type:range': (constants.MIN_ASNUM, |
| 29 |
constants.MAX_4BYTE_ASNUM)}, |
| 30 |
'is_visible': True, 'default': None, |
| 31 |
'required_by_policy': False, |
| 32 |
'enforce_policy': False} |
| 33 |
}, |
| 34 |
'bgp-peers': { |
| 35 |
'remote_as': {'allow_post': True, 'allow_put': False, |
| 36 |
'validate': {'type:range': (constants.MIN_ASNUM, |
| 37 |
constants.MAX_4BYTE_ASNUM)}, |
| 38 |
'is_visible': True, 'default': None, |
| 39 |
'required_by_policy': False, |
| 40 |
'enforce_policy': False} |
| 41 |
} |
| 42 |
} |
| 43 |
SUB_RESOURCE_ATTRIBUTE_MAP = None |
| 44 |
ACTION_MAP = {} |
| 45 |
ACTION_STATUS = {} |
| 46 |
REQUIRED_EXTENSIONS = [bgp.ALIAS] |
| 47 |
OPTIONAL_EXTENSIONS = [] |