From 33031263ee6326228eb006b8346d70be7c803125 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Sun, 11 Sep 2016 00:50:19 -0700 Subject: [PATCH] Remove deprectaion warnings for db models Change-Id: I597695f60083fade117af7ca73457be544e11590 --- vmware_nsx/db/extended_security_group_rule.py | 4 ++-- vmware_nsx/db/nsxv_models.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vmware_nsx/db/extended_security_group_rule.py b/vmware_nsx/db/extended_security_group_rule.py index 9f6fd8224b..91a5eac61a 100644 --- a/vmware_nsx/db/extended_security_group_rule.py +++ b/vmware_nsx/db/extended_security_group_rule.py @@ -18,7 +18,7 @@ import sqlalchemy as sa from sqlalchemy import orm from neutron.db import db_base_plugin_v2 -from neutron.db import securitygroups_db +from neutron.db.models import securitygroup from neutron.extensions import securitygroup as ext_sg from neutron_lib.api import validators from neutron_lib import exceptions as nexception @@ -46,7 +46,7 @@ class NsxExtendedSecurityGroupRuleProperties(model_base.BASEV2): local_ip_prefix = sa.Column(sa.String(255), nullable=False) rule = orm.relationship( - securitygroups_db.SecurityGroupRule, + securitygroup.SecurityGroupRule, backref=orm.backref('ext_properties', lazy='joined', uselist=False, cascade='delete')) diff --git a/vmware_nsx/db/nsxv_models.py b/vmware_nsx/db/nsxv_models.py index 1cd643bd6a..651a065d84 100644 --- a/vmware_nsx/db/nsxv_models.py +++ b/vmware_nsx/db/nsxv_models.py @@ -25,7 +25,7 @@ from oslo_db.sqlalchemy import models from vmware_nsx.common import nsxv_constants -class NsxvRouterBinding(model_base.BASEV2, models_v2.HasStatusDescription, +class NsxvRouterBinding(model_base.BASEV2, model_base.HasStatusDescription, models.TimestampMixin): """Represents the mapping between neutron router and vShield Edge."""