Debian Codegraph @

neutron_lib/api/definitions/l3_enable_default_route_bfd.py

raw
1 # Copyright 2023 Canonical Ltd.
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 from neutron_lib.api import converters
16 from neutron_lib.api.definitions import l3
17 from neutron_lib.api.definitions import l3_ext_gw_multihoming
18 from neutron_lib import constants
19
20
21 ENABLE_DEFAULT_ROUTE_BFD = 'enable_default_route_bfd'
22
23 ALIAS = constants.L3_ENABLE_DEFAULT_ROUTE_BFD_ALIAS
24 IS_SHIM_EXTENSION = False
25 IS_STANDARD_ATTR_EXTENSION = False
26 NAME = 'Enable Default Route BFD'
27 API_PREFIX = ''
28 DESCRIPTION = 'Enables configurable BFD behavior for default routes'
29 UPDATED_TIMESTAMP = '2023-02-27T00:00:00-00:00'
30 RESOURCE_NAME = l3.ROUTER
31 COLLECTION_NAME = l3.ROUTERS
32 RESOURCE_ATTRIBUTE_MAP = {
33 COLLECTION_NAME: {
34 ENABLE_DEFAULT_ROUTE_BFD: {
35 'allow_post': True,
36 'allow_put': True,
37 'default': None,
38 'is_visible': True,
39 'enforce_policy': True,
40 'convert_to': converters.convert_to_boolean_if_not_none,
41 }
42 }
43 }
44 SUB_RESOURCE_ATTRIBUTE_MAP = {}
45 ACTION_MAP = {}
46 REQUIRED_EXTENSIONS = [l3.ALIAS, l3_ext_gw_multihoming.ALIAS]
47 OPTIONAL_EXTENSIONS = []
48 ACTION_STATUS = {}