Debian Codegraph @

neutron_lib/api/definitions/extraroute.py

raw
1 # Copyright 2013, Nachi Ueno, NTT MCL, Inc.
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 import converters
17 from neutron_lib.api.definitions import l3
18 from neutron_lib import constants
19
20 ROUTES = 'routes'
21
22 ALIAS = 'extraroute'
23 IS_SHIM_EXTENSION = False
24 IS_STANDARD_ATTR_EXTENSION = False
25 NAME = 'Neutron Extra Route'
26 API_PREFIX = ''
27 DESCRIPTION = 'Extra routes configuration for L3 router'
28 UPDATED_TIMESTAMP = '2013-02-01T10:00:00-00:00'
29 RESOURCE_NAME = l3.ROUTER
30 COLLECTION_NAME = l3.ROUTERS
31 RESOURCE_ATTRIBUTE_MAP = {
32 COLLECTION_NAME: {
33 ROUTES: {
34 'allow_post': False, 'allow_put': True,
35 'validate': {'type:hostroutes': None},
36 'convert_to': converters.convert_none_to_empty_list,
37 'is_visible': True,
38 'default': constants.ATTR_NOT_SPECIFIED},
39 }
40 }
41 SUB_RESOURCE_ATTRIBUTE_MAP = {}
42 ACTION_MAP = {}
43 REQUIRED_EXTENSIONS = [l3.ALIAS]
44 OPTIONAL_EXTENSIONS = []
45 ACTION_STATUS = {}