NSXv: duplicate code

Remove extra portgroup delete method

Change-Id: If6326dc620c17e700dc1165254e0bf578b7c8169
This commit is contained in:
Kobi Samoray 2016-08-03 12:34:49 +03:00
parent ac98bf6bfe
commit 58e67d03c4
2 changed files with 1 additions and 11 deletions

View File

@ -758,16 +758,6 @@ class EdgeApplianceDriver(object):
return task_constants.TaskStatus.ERROR
return task_constants.TaskStatus.COMPLETED
def delete_portgroup(self, dvs_id, port_group_id):
task_name = "delete-port-group-%s" % port_group_id
userdata = {'dvs_id': dvs_id,
'port_group_id': port_group_id}
task = tasks.Task(task_name, port_group_id,
self._delete_port_group,
status_callback=self._delete_port_group,
userdata=userdata)
self.task_manager.add(task)
def _retry_task(self, task):
delay = 0.5
max_retries = max(cfg.CONF.nsxv.retries, 1)

View File

@ -430,7 +430,7 @@ class EdgeManager(object):
if port_group_id:
dvs_id, net_type = self._get_physical_provider_network(
context, network_id)
self.nsxv_manager.delete_portgroup(dvs_id,
self.nsxv_manager.delete_port_group(dvs_id,
port_group_id)
else:
self.nsxv_manager.vcns.update_interface(edge_id, vnic_config)