From 22ffe94c70eb85ec57af98e13dc4cb0cfb631034 Mon Sep 17 00:00:00 2001 From: garyk Date: Sat, 6 Feb 2016 02:55:39 +0000 Subject: [PATCH] Revert "[NSXv]: Push description to NSXv edge during creation" This reverts commit 58bc7531608feb2792487400ebc4d894c1a95c2e. The reason for reverting is that we are able to use tags for the edges. We should use this instead of using the description. That is the better solution. Change-Id: I7c22380cf2d5c495e964c62bb7a7522bd974bd76 --- .../plugins/nsx_v/vshield/edge_appliance_driver.py | 12 +++--------- vmware_nsx/plugins/nsx_v/vshield/edge_utils.py | 10 +++------- .../tests/unit/nsx_v/vshield/test_edge_utils.py | 4 +--- 3 files changed, 7 insertions(+), 19 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 d6e17b85bd..efc13a407f 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py +++ b/vmware_nsx/plugins/nsx_v/vshield/edge_appliance_driver.py @@ -45,8 +45,7 @@ class EdgeApplianceDriver(object): def _assemble_edge(self, name, appliance_size="compact", deployment_container_id=None, datacenter_moid=None, enable_aesni=True, dist=False, - enable_fips=False, remote_access=False, - description=None): + enable_fips=False, remote_access=False): edge = { 'name': name, 'fqdn': None, @@ -63,9 +62,6 @@ class EdgeApplianceDriver(object): 'applianceSize': appliance_size }, } - if description: - edge['description'] = description - if not dist: edge['type'] = "gatewayServices" edge['vnics'] = {'vnics': []} @@ -474,15 +470,13 @@ class EdgeApplianceDriver(object): def deploy_edge(self, resource_id, name, internal_network, jobdata=None, dist=False, wait_for_exec=False, loadbalancer_enable=True, - appliance_size=nsxv_constants.LARGE, async=True, - description=None): + appliance_size=nsxv_constants.LARGE, async=True): task_name = 'deploying-%s' % name edge_name = name edge = self._assemble_edge( edge_name, datacenter_moid=self.datacenter_moid, deployment_container_id=self.deployment_container_id, - appliance_size=appliance_size, remote_access=True, dist=dist, - description=description) + appliance_size=appliance_size, remote_access=True, dist=dist) appliance = self._assemble_edge_appliance(self.resource_pool_id, self.datastore_id) if appliance: diff --git a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py index 0b99f17e27..9b40b3c846 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py +++ b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py @@ -30,7 +30,6 @@ from neutron.common import exceptions as n_exc from neutron import context as q_context from neutron.extensions import l3 from neutron.plugins.common import constants as plugin_const -from neutron import version from vmware_nsx._i18n import _, _LE, _LW from vmware_nsx.common import exceptions as nsx_exc @@ -138,8 +137,7 @@ class EdgeManager(object): lrouter['id'], lrouter['name'], internal_network=None, jobdata=jobdata, wait_for_exec=True, appliance_size=appliance_size, - dist=(edge_type == nsxv_constants.VDR_EDGE), async=async, - description=version.version_info.release_string()) + dist=(edge_type == nsxv_constants.VDR_EDGE), async=async) return task def _deploy_backup_edges_on_db(self, context, num, @@ -1404,8 +1402,7 @@ def create_lrouter(nsxv_manager, context, lrouter, lswitch=None, dist=False): # as we're not in a database transaction now task = nsxv_manager.deploy_edge( router_id, router_name, internal_network=None, - dist=dist, jobdata=jobdata, appliance_size=appliance_size, - description=version.version_info.release_string()) + dist=dist, jobdata=jobdata, appliance_size=appliance_size) task.wait(task_const.TaskState.RESULT) @@ -1437,8 +1434,7 @@ def create_dhcp_service(context, nsxv_manager, network): # Deploy an Edge for dhcp service return nsxv_manager.deploy_edge( network['id'], edge_name, nsx_network_id, jobdata=jobdata, - appliance_size=vcns_const.SERVICE_SIZE_MAPPING['dhcp'], - description=version.version_info.release_string()) + appliance_size=vcns_const.SERVICE_SIZE_MAPPING['dhcp']) def delete_dhcp_service(context, nsxv_manager, network_id): diff --git a/vmware_nsx/tests/unit/nsx_v/vshield/test_edge_utils.py b/vmware_nsx/tests/unit/nsx_v/vshield/test_edge_utils.py index 9f7f2dc925..320d598aec 100644 --- a/vmware_nsx/tests/unit/nsx_v/vshield/test_edge_utils.py +++ b/vmware_nsx/tests/unit/nsx_v/vshield/test_edge_utils.py @@ -22,7 +22,6 @@ from neutron.common import exceptions as n_exc from neutron import context from neutron.plugins.common import constants as plugin_const from neutron.tests.unit import testlib_api -from neutron import version from vmware_nsx.common import nsxv_constants from vmware_nsx.db import nsxv_db from vmware_nsx.plugins.nsx_v.vshield.common import ( @@ -132,8 +131,7 @@ class EdgeUtilsTestCase(EdgeUtilsTestCaseMixin): 'lrouter': lrouter, 'lswitch': None, 'context': self.ctx}, - appliance_size=vcns_const.SERVICE_SIZE_MAPPING['router'], - description=version.version_info.release_string()) + appliance_size=vcns_const.SERVICE_SIZE_MAPPING['router']) class EdgeManagerTestCase(EdgeUtilsTestCaseMixin):