Debian Codegraph @

neutron_lib/api/definitions/port_numa_affinity_policy_socket.py

raw
1 # Copyright (c) 2024 Red Hat, Inc.
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 from neutron_lib.api.definitions import port_numa_affinity_policy
17 from neutron_lib import constants
18
19
20 ALIAS = 'port-numa-affinity-policy-socket'
21 IS_SHIM_EXTENSION = False
22 IS_STANDARD_ATTR_EXTENSION = False
23 NAME = 'Port NUMA affinity policy "socket"'
24 DESCRIPTION = 'Adds "socket" to the supported port NUMA affinity policies'
25 UPDATED_TIMESTAMP = "2024-02-09T10:00:00-00:00"
26 RESOURCE_NAME = port.RESOURCE_NAME
27 COLLECTION_NAME = port.COLLECTION_NAME
28 NUMA_AFFINITY_POLICY = port_numa_affinity_policy.NUMA_AFFINITY_POLICY
29
30 RESOURCE_ATTRIBUTE_MAP = {
31 COLLECTION_NAME: {
32 NUMA_AFFINITY_POLICY: {
33 'allow_post': True,
34 'allow_put': True,
35 'validate': {
36 'type:values': constants.PORT_NUMA_POLICIES + (None,)},
37 'default': None,
38 'is_visible': True}
39 },
40 }
41
42 SUB_RESOURCE_ATTRIBUTE_MAP = None
43 ACTION_MAP = {}
44 ACTION_STATUS = {}
45 REQUIRED_EXTENSIONS = [port_numa_affinity_policy.ALIAS]
46 OPTIONAL_EXTENSIONS = []