Update port-mac-address-override shim extension

The port-mac-address-override shim extension proposed in
I54b4c85ffc4856fba7ad5e9e29f77f74815e1275 in neutron-lib has merged
and the neutron-lib has being released. So this patch updates the
API extension and replaces the import with the new neutron_lib api
definitions.

Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/831935

Change-Id: Ic332769af532003a9a5b2d2cee38b6210b5aac91
Related-Bug: #1942329
This commit is contained in:
sunxifa 2022-06-04 15:19:52 +08:00
parent d253b9fd08
commit 326c0076ef
3 changed files with 2 additions and 47 deletions

View File

@ -1,33 +0,0 @@
# 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.
# TODO(gibi): remove this when the neutron-lib change
# https://review.opendev.org/c/openstack/neutron-lib/+/831935 merged and
# released
NAME = 'Neutron Port MAC address override'
ALIAS = 'port-mac-override'
DESCRIPTION = (
"Allow overriding the MAC address of a direct-physical Port via the "
"active binding profile")
UPDATED_TIMESTAMP = "2022-03-18T10:00:00-00:00"
RESOURCE_ATTRIBUTE_MAP = {}
IS_SHIM_EXTENSION = True
IS_STANDARD_ATTR_EXTENSION = False
SUB_RESOURCE_ATTRIBUTE_MAP = {}
ACTION_MAP = {}
REQUIRED_EXTENSIONS = []
OPTIONAL_EXTENSIONS = []
ACTION_STATUS = {}

View File

@ -11,13 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO(gibi): replace the import with
# from neutron_lib.api.definitions import port_mac_address_override
# once https://review.opendev.org/c/openstack/neutron-lib/+/831935 merged and
# neutron-lib is released
from neutron.extensions import (
_port_mac_address_override as port_mac_address_override
)
from neutron_lib.api.definitions import port_mac_address_override
from neutron_lib.api import extensions as api_extensions

View File

@ -42,6 +42,7 @@ from neutron_lib.api.definitions import network_mtu as mtu_apidef
from neutron_lib.api.definitions import network_mtu_writable as mtuw_apidef
from neutron_lib.api.definitions import port as port_def
from neutron_lib.api.definitions import port_device_profile as pdp_def
from neutron_lib.api.definitions import port_mac_address_override
from neutron_lib.api.definitions import port_mac_address_regenerate
from neutron_lib.api.definitions import port_numa_affinity_policy as pnap_def
from neutron_lib.api.definitions import port_security as psec
@ -123,13 +124,6 @@ from neutron.db import securitygroups_rpc_base as sg_db_rpc
from neutron.db import segments_db
from neutron.db import subnet_service_type_mixin
from neutron.db import vlantransparent_db
# TODO(gibi): replace the import with
# from neutron_lib.api.definitions import port_mac_address_override
# once https://review.opendev.org/c/openstack/neutron-lib/+/831935 merged and
# neutron-lib is released
from neutron.extensions import (
_port_mac_address_override as port_mac_address_override
)
from neutron.extensions import dhcpagentscheduler as dhcp_ext
from neutron.extensions import filter_validation
from neutron.extensions import vlantransparent