Merge "Fix duplicate dhcp edge name error"
This commit is contained in:
commit
dc02dc4b1c
@ -631,7 +631,8 @@ class EdgeManager(object):
|
|||||||
router_id, binding['edge_id'], jobdata=jobdata, dist=dist)
|
router_id, binding['edge_id'], jobdata=jobdata, dist=dist)
|
||||||
|
|
||||||
def _allocate_dhcp_edge_appliance(self, context, resource_id):
|
def _allocate_dhcp_edge_appliance(self, context, resource_id):
|
||||||
resource_name = resource_id
|
resource_name = (vcns_const.DHCP_EDGE_PREFIX +
|
||||||
|
_uuid())[:vcns_const.EDGE_NAME_LEN]
|
||||||
self._allocate_edge_appliance(
|
self._allocate_edge_appliance(
|
||||||
context, resource_id, resource_name,
|
context, resource_id, resource_name,
|
||||||
appliance_size=vcns_const.SERVICE_SIZE_MAPPING['dhcp'])
|
appliance_size=vcns_const.SERVICE_SIZE_MAPPING['dhcp'])
|
||||||
|
@ -111,10 +111,9 @@ class EdgeDHCPManagerTestCase(EdgeUtilsTestCaseMixin):
|
|||||||
self.edge_manager.create_dhcp_edge_service(self.ctx,
|
self.edge_manager.create_dhcp_edge_service(self.ctx,
|
||||||
fake_network['id'],
|
fake_network['id'],
|
||||||
fake_subnet)
|
fake_subnet)
|
||||||
resource_id = resource_name = (vcns_const.DHCP_EDGE_PREFIX +
|
resource_id = (vcns_const.DHCP_EDGE_PREFIX + fake_network['id'])[:36]
|
||||||
fake_network['id'])[:36]
|
|
||||||
self.nsxv_manager.update_edge.assert_called_once_with(
|
self.nsxv_manager.update_edge.assert_called_once_with(
|
||||||
resource_id, 'edge-1', resource_name, None,
|
resource_id, 'edge-1', mock.ANY, None,
|
||||||
appliance_size=vcns_const.SERVICE_SIZE_MAPPING['dhcp'],
|
appliance_size=vcns_const.SERVICE_SIZE_MAPPING['dhcp'],
|
||||||
dist=False)
|
dist=False)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user