Fix failing unit tests from neutron changes

The following patch in neutron:

a92647300d0148d5d23f7c16631b192923702a1f

checked the paths to where the securitygroup_db models were located. This
patch fixes the issue by updating the path in the vmware-nsx repo so the
tests pass again.

Change-Id: I7d81ce5cd7ee76928f607d6976ae90b1a7d976a1
This commit is contained in:
Aaron Rosen 2016-08-31 20:03:11 -07:00
parent 1d07f7b63a
commit e64512ed2c

View File

@ -17,6 +17,7 @@ import logging
import xml.etree.ElementTree as et
from neutron import context
from neutron.db.models import securitygroup as sg_models
from neutron.db import models_v2
from neutron.db import securitygroups_db
@ -41,8 +42,8 @@ class NeutronSecurityGroupDB(utils.NeutronDbClient,
def get_security_groups_mappings(self):
q = self.context.session.query(
securitygroups_db.SecurityGroup.name,
securitygroups_db.SecurityGroup.id,
sg_models.SecurityGroup.name,
sg_models.SecurityGroup.id,
nsxv_models.NsxvSecurityGroupSectionMapping.ip_section_id,
nsx_models.NeutronNsxSecurityGroupMapping.nsx_id).join(
nsxv_models.NsxvSecurityGroupSectionMapping,
@ -82,7 +83,7 @@ class NeutronSecurityGroupDB(utils.NeutronDbClient,
vnics = []
query = self.context.session.query(
models_v2.Port.id, models_v2.Port.device_id
).join(securitygroups_db.SecurityGroupPortBinding).filter_by(
).join(sg_models.SecurityGroupPortBinding).filter_by(
security_group_id=security_group_id).all()
for p in query:
vnic_index = plugin._get_port_vnic_index(self.context, p.id)