| 1 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 2 |
# not use this file except in compliance with the License. You may obtain |
| 3 |
# a copy of the License at |
| 4 |
# |
| 5 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 |
# |
| 7 |
# Unless required by applicable law or agreed to in writing, software |
| 8 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 9 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 10 |
# License for the specific language governing permissions and limitations |
| 11 |
# under the License. |
| 12 |
|
| 13 |
import copy |
| 14 |
|
| 15 |
from neutron_lib.api.definitions import port as port_def |
| 16 |
from neutron_lib.api.definitions import uplink_status_propagation as usp |
| 17 |
|
| 18 |
|
| 19 |
ALIAS = 'uplink-status-propagation-updatable' |
| 20 |
IS_SHIM_EXTENSION = False |
| 21 |
IS_STANDARD_ATTR_EXTENSION = False |
| 22 |
NAME = 'Uplink status propagation updatable extension' |
| 23 |
API_PREFIX = '' |
| 24 |
DESCRIPTION = 'Provides ability to update the port uplink status.' |
| 25 |
UPDATED_TIMESTAMP = '2024-09-03T18:00:00-00:00' |
| 26 |
PROPAGATE_UPLINK_STATUS = usp.PROPAGATE_UPLINK_STATUS |
| 27 |
RESOURCE_NAME = port_def.RESOURCE_NAME |
| 28 |
COLLECTION_NAME = port_def.COLLECTION_NAME |
| 29 |
|
| 30 |
|
| 31 |
propagate_uplink_status = copy.deepcopy( |
| 32 |
usp.RESOURCE_ATTRIBUTE_MAP[COLLECTION_NAME][PROPAGATE_UPLINK_STATUS]) |
| 33 |
propagate_uplink_status['allow_put'] = True |
| 34 |
|
| 35 |
RESOURCE_ATTRIBUTE_MAP = { |
| 36 |
COLLECTION_NAME: {PROPAGATE_UPLINK_STATUS: propagate_uplink_status}, |
| 37 |
} |
| 38 |
|
| 39 |
SUB_RESOURCE_ATTRIBUTE_MAP = {} |
| 40 |
ACTION_MAP = {} |
| 41 |
REQUIRED_EXTENSIONS = [usp.ALIAS] |
| 42 |
OPTIONAL_EXTENSIONS = [] |
| 43 |
ACTION_STATUS = {} |