| 1 |
# |
| 2 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 3 |
# not use this file except in compliance with the License. You may obtain |
| 4 |
# a copy of the License at |
| 5 |
# |
| 6 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 |
# |
| 8 |
# Unless required by applicable law or agreed to in writing, software |
| 9 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 10 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 11 |
# License for the specific language governing permissions and limitations |
| 12 |
# under the License. |
| 13 |
|
| 14 |
import copy |
| 15 |
import typing |
| 16 |
|
| 17 |
from neutron_lib.api.definitions import l3 |
| 18 |
from neutron_lib.api.definitions import l3_ext_gw_mode |
| 19 |
from neutron_lib.api.definitions import qos |
| 20 |
from neutron_lib.services.qos import constants as qos_consts |
| 21 |
|
| 22 |
|
| 23 |
ALIAS = 'qos-gateway-ip' |
| 24 |
IS_SHIM_EXTENSION = False |
| 25 |
IS_STANDARD_ATTR_EXTENSION = False |
| 26 |
NAME = 'Router gateway IP QoS' |
| 27 |
API_PREFIX = '' |
| 28 |
DESCRIPTION = 'The Router gateway IP Quality of Service extension' |
| 29 |
UPDATED_TIMESTAMP = '2018-02-24T00:00:00-00:00' |
| 30 |
RESOURCE_NAME = l3.ROUTER |
| 31 |
COLLECTION_NAME = l3.ROUTERS |
| 32 |
|
| 33 |
routers: dict[str, typing.Any] = copy.deepcopy( |
| 34 |
l3_ext_gw_mode.RESOURCE_ATTRIBUTE_MAP[COLLECTION_NAME] |
| 35 |
) |
| 36 |
routers[l3.EXTERNAL_GW_INFO]['validate']['type:dict_or_nodata'][ |
| 37 |
qos_consts.QOS_POLICY_ID] = { |
| 38 |
'type:uuid_or_none': None, |
| 39 |
'required': False |
| 40 |
} |
| 41 |
RESOURCE_ATTRIBUTE_MAP = { |
| 42 |
COLLECTION_NAME: routers |
| 43 |
} |
| 44 |
|
| 45 |
SUB_RESOURCE_ATTRIBUTE_MAP = {} |
| 46 |
ACTION_MAP = {} |
| 47 |
REQUIRED_EXTENSIONS = [l3.ALIAS, qos.ALIAS, l3_ext_gw_mode.ALIAS] |
| 48 |
OPTIONAL_EXTENSIONS = [] |
| 49 |
ACTION_STATUS = {} |