Debian Codegraph @

neutron_lib/api/definitions/qos_bw_limit_direction.py

raw
1 # Copyright (c) 2017 OVH SAS
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.definitions import qos as qos_apidef
17 from neutron_lib import constants
18 from neutron_lib.services.qos import constants as qos_const
19
20
21 ALIAS = 'qos-bw-limit-direction'
22 LABEL = ''
23 IS_SHIM_EXTENSION = False
24 IS_STANDARD_ATTR_EXTENSION = False
25 NAME = 'Direction for QoS bandwidth limit rule'
26 API_PREFIX = ''
27 DESCRIPTION = ("Allow to configure QoS bandwidth limit rule with specific "
28 "direction: ingress or egress")
29 UPDATED_TIMESTAMP = '2017-04-10T10:00:00-00:00'
30 RESOURCE_ATTRIBUTE_MAP = {}
31 SUB_RESOURCE_ATTRIBUTE_MAP = {
32 # NOTE(boden): parameters is required here as BANDWIDTH_LIMIT_RULES is a
33 # sub-resource extension itself
34 qos_apidef.BANDWIDTH_LIMIT_RULES: {
35 'parameters': {
36 qos_const.DIRECTION: {
37 'allow_post': True,
38 'allow_put': True,
39 'is_visible': True,
40 'is_filter': True,
41 'is_sort_key': True,
42 'default': constants.EGRESS_DIRECTION,
43 'validate': {
44 'type:values': constants.VALID_DIRECTIONS
45 }
46 }
47 }
48 }
49 }
50 ACTION_MAP = {}
51 REQUIRED_EXTENSIONS = [qos_apidef.ALIAS]
52 OPTIONAL_EXTENSIONS = []
53 ACTION_STATUS = {}