Add a shim extension standard-attr-fwaas-v2

Neutron-fwaas patch: https://review.opendev.org/c/866988

Partial-Bug: #1986906
Change-Id: I8db2eed7b55c12042804de1710778b008d8bf49c
This commit is contained in:
liushy 2023-04-27 14:59:02 +08:00
parent e52a9372f7
commit 210862034b
5 changed files with 61 additions and 0 deletions

View File

@ -52,6 +52,7 @@ from neutron_lib.api.definitions import fip_pf_detail
from neutron_lib.api.definitions import fip_pf_port_range
from neutron_lib.api.definitions import fip_port_details
from neutron_lib.api.definitions import firewall_v2
from neutron_lib.api.definitions import firewall_v2_stdattrs
from neutron_lib.api.definitions import flavors
from neutron_lib.api.definitions import floating_ip_port_forwarding
from neutron_lib.api.definitions import floatingip_autodelete_internal
@ -195,6 +196,7 @@ _ALL_API_DEFINITIONS = {
filter_validation,
fip64,
firewall_v2,
firewall_v2_stdattrs,
fip_distributed,
fip_pf_detail,
fip_port_details,

View File

@ -160,6 +160,7 @@ KNOWN_EXTENSIONS = (
'sort-key-validation',
'sorting',
'standard-attr-description',
'standard-attr-fwaas-v2',
'standard-attr-revisions',
'standard-attr-segment',
'standard-attr-timestamp',

View File

@ -0,0 +1,33 @@
# Copyright 2023 EasyStack Limited
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import firewall_v2
ALIAS = 'standard-attr-fwaas-v2'
IS_SHIM_EXTENSION = True
IS_STANDARD_ATTR_EXTENSION = True
NAME = 'Standard Attribute FWaaS v2 Extension'
DESCRIPTION = 'Add standard attributes to FWaaS v2 resources'
UPDATED_TIMESTAMP = '2023-04-027T01:00:00-00:00'
RESOURCE_ATTRIBUTE_MAP = {}
SUB_RESOURCE_ATTRIBUTE_MAP = {}
ACTION_MAP = {}
REQUIRED_EXTENSIONS = [firewall_v2.ALIAS]
OPTIONAL_EXTENSIONS = [
'standard-attr-description',
'standard-attr-timestamp',
'standard-attr-revisions'
]
ACTION_STATUS = {}

View File

@ -0,0 +1,20 @@
# Copyright 2023 EasyStack Limited
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from neutron_lib.api.definitions import firewall_v2_stdattrs
from neutron_lib.tests.unit.api.definitions import base
class FWaaSV2StdAttrDefinitionTestCase(base.DefinitionBaseTestCase):
extension_module = firewall_v2_stdattrs

View File

@ -0,0 +1,5 @@
---
features:
- |
Add API extensions to advertise the support of standard attributes with
FWaaS v2 resources: ``standard-attr-fwaas-v2``.