| 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 |
from neutron_lib.api.definitions import floating_ip_port_forwarding as pfw |
| 14 |
from neutron_lib.db import constants as db_const |
| 15 |
|
| 16 |
DESCRIPTION_FIELD = "description" |
| 17 |
|
| 18 |
ALIAS = 'floating-ip-port-forwarding-description' |
| 19 |
IS_SHIM_EXTENSION = False |
| 20 |
IS_STANDARD_ATTR_EXTENSION = False |
| 21 |
NAME = 'Floating IP Port Forwarding new attribute description' |
| 22 |
DESCRIPTION = 'Add a description field to Port Forwarding rules' |
| 23 |
UPDATED_TIMESTAMP = '2019-11-01T10:00:00-00:00' |
| 24 |
RESOURCE_ATTRIBUTE_MAP = {} |
| 25 |
SUB_RESOURCE_ATTRIBUTE_MAP = { |
| 26 |
pfw.COLLECTION_NAME: { |
| 27 |
'parameters': { |
| 28 |
DESCRIPTION_FIELD: { |
| 29 |
'allow_post': True, |
| 30 |
'allow_put': True, |
| 31 |
'validate': { |
| 32 |
'type:string': |
| 33 |
db_const.LONG_DESCRIPTION_FIELD_SIZE}, |
| 34 |
'is_visible': True, |
| 35 |
'is_sort_key': False, |
| 36 |
'is_filter': True, |
| 37 |
'default': '' |
| 38 |
} |
| 39 |
} |
| 40 |
} |
| 41 |
} |
| 42 |
ACTION_MAP = {} |
| 43 |
REQUIRED_EXTENSIONS = [pfw.ALIAS] |
| 44 |
OPTIONAL_EXTENSIONS = [] |
| 45 |
ACTION_STATUS = {} |