Debian Codegraph @

neutron_lib/api/definitions/port_hints.py

raw
1 # Copyright (c) 2023 Ericsson Software Technology
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.definitions import port
16
17
18 ALIAS = 'port-hints'
19 IS_SHIM_EXTENSION = False
20 IS_STANDARD_ATTR_EXTENSION = False
21 NAME = 'Port hints'
22 DESCRIPTION = 'Backend specific port hints to allow backend specific tuning'
23 UPDATED_TIMESTAMP = '2023-01-01T00:00:00-00:00'
24 RESOURCE_NAME = port.RESOURCE_NAME
25 COLLECTION_NAME = port.COLLECTION_NAME
26 HINTS = 'hints'
27 HINTS_SPEC = {
28 'type:dict_or_none': {'openvswitch': {
29 'type:dict': {'other_config': {
30 'type:dict': {'tx-steering': {
31 'type:values': ['thread', 'hash']}}}}}}}
32
33 RESOURCE_ATTRIBUTE_MAP = {
34 COLLECTION_NAME: {
35 HINTS: {
36 'allow_post': True,
37 'allow_put': True,
38 'default': None,
39 'enforce_policy': True,
40 'is_visible': True,
41 'validate': HINTS_SPEC,
42 },
43 },
44 }
45
46 SUB_RESOURCE_ATTRIBUTE_MAP = None
47 ACTION_MAP = {}
48 ACTION_STATUS = {}
49 REQUIRED_EXTENSIONS = []
50 OPTIONAL_EXTENSIONS = []