From 4950717f9550732f6655c97afda07ed401a37a0d Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Mon, 15 Aug 2016 12:12:32 +0300 Subject: [PATCH] Remove deprecation warning - security group db Security groups structures moved from: neutron.db.securitygroups_db to: neutron.db.models.securitygroup Change-Id: I53687f96ff5170a9c35be7b19f5011171092a628 --- vmware_nsx/db/extended_security_group.py | 2 +- vmware_nsx/plugins/dvs/plugin.py | 5 +++-- vmware_nsx/plugins/nsx_mh/plugin.py | 5 +++-- vmware_nsx/plugins/nsx_v/plugin.py | 5 +++-- vmware_nsx/plugins/nsx_v3/plugin.py | 5 +++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/vmware_nsx/db/extended_security_group.py b/vmware_nsx/db/extended_security_group.py index ce2b8780de..a5e6dd369b 100644 --- a/vmware_nsx/db/extended_security_group.py +++ b/vmware_nsx/db/extended_security_group.py @@ -22,7 +22,7 @@ from neutron.common import utils as n_utils from neutron.db import api as db_api from neutron.db import db_base_plugin_v2 from neutron.db import model_base -from neutron.db import securitygroups_db +from neutron.db.models import securitygroup as securitygroups_db # noqa from neutron.extensions import securitygroup as ext_sg from neutron_lib.api import validators from neutron_lib import constants as n_constants diff --git a/vmware_nsx/plugins/dvs/plugin.py b/vmware_nsx/plugins/dvs/plugin.py index 6d18554abe..2ba8352769 100644 --- a/vmware_nsx/plugins/dvs/plugin.py +++ b/vmware_nsx/plugins/dvs/plugin.py @@ -24,6 +24,7 @@ from neutron.db import allowedaddresspairs_db as addr_pair_db from neutron.db import db_base_plugin_v2 from neutron.db import external_net_db from neutron.db import l3_db +from neutron.db.models import securitygroup as securitygroup_model # noqa from neutron.db import models_v2 from neutron.db import portbindings_db from neutron.db import portsecurity_db @@ -82,8 +83,8 @@ class NsxDvsV2(addr_pair_db.AllowedAddressPairsMixin, port=models_v2.Port, subnet=models_v2.Subnet, subnetpool=models_v2.SubnetPool, - security_group=securitygroups_db.SecurityGroup, - security_group_rule=securitygroups_db.SecurityGroupRule) + security_group=securitygroup_model.SecurityGroup, + security_group_rule=securitygroup_model.SecurityGroupRule) def __init__(self): super(NsxDvsV2, self).__init__() LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled()) diff --git a/vmware_nsx/plugins/nsx_mh/plugin.py b/vmware_nsx/plugins/nsx_mh/plugin.py index 575435a66d..1b9a2569f8 100644 --- a/vmware_nsx/plugins/nsx_mh/plugin.py +++ b/vmware_nsx/plugins/nsx_mh/plugin.py @@ -42,6 +42,7 @@ from neutron.db import extraroute_db from neutron.db import l3_db from neutron.db import l3_dvr_db from neutron.db import l3_gwmode_db +from neutron.db.models import securitygroup as securitygroup_model # noqa from neutron.db import models_v2 from neutron.db import portbindings_db from neutron.db import portsecurity_db @@ -140,8 +141,8 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin, port=models_v2.Port, subnet=models_v2.Subnet, subnetpool=models_v2.SubnetPool, - security_group=securitygroups_db.SecurityGroup, - security_group_rule=securitygroups_db.SecurityGroupRule, + security_group=securitygroup_model.SecurityGroup, + security_group_rule=securitygroup_model.SecurityGroupRule, router=l3_db.Router, floatingip=l3_db.FloatingIP) def __init__(self): diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index fbb170e6dc..036e4af44c 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -47,6 +47,7 @@ from neutron.db import external_net_db from neutron.db import extraroute_db from neutron.db import l3_db from neutron.db import l3_gwmode_db +from neutron.db.models import securitygroup as securitygroup_model # noqa from neutron.db import models_v2 from neutron.db import portbindings_db from neutron.db import portsecurity_db @@ -167,8 +168,8 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin, port=models_v2.Port, subnet=models_v2.Subnet, subnetpool=models_v2.SubnetPool, - security_group=securitygroups_db.SecurityGroup, - security_group_rule=securitygroups_db.SecurityGroupRule, + security_group=securitygroup_model.SecurityGroup, + security_group_rule=securitygroup_model.SecurityGroupRule, router=l3_db.Router, floatingip=l3_db.FloatingIP) def __init__(self): diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index 23691eb07d..ffe6bf70bb 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -40,6 +40,7 @@ from neutron.db import extradhcpopt_db from neutron.db import extraroute_db from neutron.db import l3_db from neutron.db import l3_gwmode_db +from neutron.db.models import securitygroup as securitygroup_model # noqa from neutron.db import models_v2 from neutron.db import portbindings_db from neutron.db import portsecurity_db @@ -155,8 +156,8 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, port=models_v2.Port, subnet=models_v2.Subnet, subnetpool=models_v2.SubnetPool, - security_group=securitygroups_db.SecurityGroup, - security_group_rule=securitygroups_db.SecurityGroupRule, + security_group=securitygroup_model.SecurityGroup, + security_group_rule=securitygroup_model.SecurityGroupRule, router=l3_db.Router, floatingip=l3_db.FloatingIP) def __init__(self):