Merge "Fix ml2 hierarchical port binding driver check error."
This commit is contained in:
commit
73caa250e3
|
@ -853,7 +853,7 @@ class MechanismManager(stevedore.named.NamedExtensionManager):
|
|||
# level to one of the segments we are currently trying to
|
||||
# bind. Note that it is OK for the same driver to bind at
|
||||
# multiple levels using different segments.
|
||||
segment_ids_to_bind = {s[api.SEGMENTATION_ID]
|
||||
segment_ids_to_bind = {s[api.ID]
|
||||
for s in segments_to_bind}
|
||||
for level in binding_levels:
|
||||
if (level.driver == driver.name and
|
||||
|
|
|
@ -31,13 +31,13 @@ from neutron.tests.unit.plugins.ml2.drivers import mechanism_test
|
|||
class TestManagers(base.BaseTestCase):
|
||||
def setUp(self):
|
||||
super(TestManagers, self).setUp()
|
||||
self.segment_id = 49
|
||||
self.segments_to_bind = [{api.ID: "id1",
|
||||
'network_type': 'vlan',
|
||||
'physical_network': 'public',
|
||||
api.SEGMENTATION_ID: self.segment_id}]
|
||||
self.segment_id = "11111111-2222-3333-4444-555555555555"
|
||||
self.segments_to_bind = [{api.ID: self.segment_id,
|
||||
'network_type': 'vlan',
|
||||
'physical_network': 'public',
|
||||
api.SEGMENTATION_ID: 49}]
|
||||
self.context = FakePortContext(None,
|
||||
None,
|
||||
None,
|
||||
self.segments_to_bind)
|
||||
self.context._binding = mock.Mock()
|
||||
self.context._binding_levels = []
|
||||
|
|
Loading…
Reference in New Issue