Fix log message for unreferenced variable
Fixed bug 1091664 Change-Id: I83110fd8d05d8a5168cbc21ce78c3c44d01c7ae1
This commit is contained in:
parent
e0fae858b3
commit
71a747251a
@ -111,7 +111,7 @@ def sync_vlan_allocations(network_vlan_ranges):
|
||||
LOG.debug(_("Removing vlan %(vlan_id)s on physical "
|
||||
"network %(physical_network)s from pool"),
|
||||
{'vlan_id': alloc.vlan_id,
|
||||
'physical_network': physical_network})
|
||||
'physical_network': alloc.physical_network})
|
||||
session.delete(alloc)
|
||||
|
||||
|
||||
|
@ -164,6 +164,19 @@ class VlanAllocationsTest(unittest2.TestCase):
|
||||
ovs_db_v2.release_vlan(self.session, PHYS_NET, vlan_id, VLAN_RANGES)
|
||||
self.assertIsNone(ovs_db_v2.get_vlan_allocation(PHYS_NET, vlan_id))
|
||||
|
||||
def test_sync_with_allocated_false(self):
|
||||
vlan_ids = set()
|
||||
for x in xrange(VLAN_MIN, VLAN_MAX + 1):
|
||||
physical_network, vlan_id = ovs_db_v2.reserve_vlan(self.session)
|
||||
self.assertEqual(physical_network, PHYS_NET)
|
||||
self.assertGreaterEqual(vlan_id, VLAN_MIN)
|
||||
self.assertLessEqual(vlan_id, VLAN_MAX)
|
||||
vlan_ids.add(vlan_id)
|
||||
|
||||
ovs_db_v2.release_vlan(self.session, PHYS_NET, vlan_ids.pop(),
|
||||
VLAN_RANGES)
|
||||
ovs_db_v2.sync_vlan_allocations({})
|
||||
|
||||
|
||||
class TunnelAllocationsTest(unittest2.TestCase):
|
||||
def setUp(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user