From e6ce1b2f80d8893a7a9d1c75f4c772ce41c7b6f3 Mon Sep 17 00:00:00 2001 From: Boden R Date: Thu, 19 Jan 2017 09:18:29 -0700 Subject: [PATCH] Use neutron-lib portbindings api-def This patch refactors dragonflow to use portbindings from neutron-lib. For more details see [1]. NeutronLibImpact [1] https://review.openstack.org/422210/ Change-Id: Icfc27e2ac76b7bda0e9fceae30217610cdc64256 --- dragonflow/conf/df_common_params.py | 2 +- dragonflow/neutron/common/constants.py | 2 +- dragonflow/neutron/ml2/mech_driver.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dragonflow/conf/df_common_params.py b/dragonflow/conf/df_common_params.py index 1fe7261bc..dbf94d5a9 100644 --- a/dragonflow/conf/df_common_params.py +++ b/dragonflow/conf/df_common_params.py @@ -10,10 +10,10 @@ # License for the specific language governing permissions and limitations # under the License. +from neutron_lib.api.definitions import portbindings from oslo_config import cfg from dragonflow._i18n import _ -from neutron.extensions import portbindings df_opts = [ cfg.IPOpt('remote_db_ip', diff --git a/dragonflow/neutron/common/constants.py b/dragonflow/neutron/common/constants.py index 8551f5183..cc0e8c185 100644 --- a/dragonflow/neutron/common/constants.py +++ b/dragonflow/neutron/common/constants.py @@ -10,7 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.extensions import portbindings +from neutron_lib.api.definitions import portbindings DF_SG_DEFAULT_NAME = 'no_sg_name' DF_SUBNET_DEFAULT_NAME = 'no_subnet_name' diff --git a/dragonflow/neutron/ml2/mech_driver.py b/dragonflow/neutron/ml2/mech_driver.py index edc1f126e..a8a5ea3e8 100644 --- a/dragonflow/neutron/ml2/mech_driver.py +++ b/dragonflow/neutron/ml2/mech_driver.py @@ -16,11 +16,11 @@ from neutron.callbacks import resources from neutron import context as n_context from neutron.extensions import allowedaddresspairs as addr_pair from neutron.extensions import extra_dhcp_opt as edo_ext -from neutron.extensions import portbindings from neutron.extensions import portsecurity as psec from neutron.plugins.common import constants from neutron.plugins.ml2 import driver_api from neutron.plugins.ml2 import models +from neutron_lib.api.definitions import portbindings from neutron_lib.api import validators from neutron_lib import constants as n_const from neutron_lib import exceptions as n_exc