From 58e67d03c4ca1163ce250eb53c2061828b14fa07 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Wed, 3 Aug 2016 12:34:49 +0300 Subject: [PATCH] NSXv: duplicate code Remove extra portgroup delete method Change-Id: If6326dc620c17e700dc1165254e0bf578b7c8169 --- .../plugins/nsx_v/vshield/edge_appliance_driver.py | 10 ---------- vmware_nsx/plugins/nsx_v/vshield/edge_utils.py | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py b/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py index f2f60170d1..9461aeb3cd 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py +++ b/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py @@ -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) diff --git a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py index 381f1f48f0..42badb2b7f 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py +++ b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py @@ -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)