Merge "Revert "[NSXv]: Push description to NSXv edge during creation""
This commit is contained in:
commit
224efd316a
@ -45,8 +45,7 @@ class EdgeApplianceDriver(object):
|
|||||||
def _assemble_edge(self, name, appliance_size="compact",
|
def _assemble_edge(self, name, appliance_size="compact",
|
||||||
deployment_container_id=None, datacenter_moid=None,
|
deployment_container_id=None, datacenter_moid=None,
|
||||||
enable_aesni=True, dist=False,
|
enable_aesni=True, dist=False,
|
||||||
enable_fips=False, remote_access=False,
|
enable_fips=False, remote_access=False):
|
||||||
description=None):
|
|
||||||
edge = {
|
edge = {
|
||||||
'name': name,
|
'name': name,
|
||||||
'fqdn': None,
|
'fqdn': None,
|
||||||
@ -63,9 +62,6 @@ class EdgeApplianceDriver(object):
|
|||||||
'applianceSize': appliance_size
|
'applianceSize': appliance_size
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if description:
|
|
||||||
edge['description'] = description
|
|
||||||
|
|
||||||
if not dist:
|
if not dist:
|
||||||
edge['type'] = "gatewayServices"
|
edge['type'] = "gatewayServices"
|
||||||
edge['vnics'] = {'vnics': []}
|
edge['vnics'] = {'vnics': []}
|
||||||
@ -474,15 +470,13 @@ class EdgeApplianceDriver(object):
|
|||||||
|
|
||||||
def deploy_edge(self, resource_id, name, internal_network, jobdata=None,
|
def deploy_edge(self, resource_id, name, internal_network, jobdata=None,
|
||||||
dist=False, wait_for_exec=False, loadbalancer_enable=True,
|
dist=False, wait_for_exec=False, loadbalancer_enable=True,
|
||||||
appliance_size=nsxv_constants.LARGE, async=True,
|
appliance_size=nsxv_constants.LARGE, async=True):
|
||||||
description=None):
|
|
||||||
task_name = 'deploying-%s' % name
|
task_name = 'deploying-%s' % name
|
||||||
edge_name = name
|
edge_name = name
|
||||||
edge = self._assemble_edge(
|
edge = self._assemble_edge(
|
||||||
edge_name, datacenter_moid=self.datacenter_moid,
|
edge_name, datacenter_moid=self.datacenter_moid,
|
||||||
deployment_container_id=self.deployment_container_id,
|
deployment_container_id=self.deployment_container_id,
|
||||||
appliance_size=appliance_size, remote_access=True, dist=dist,
|
appliance_size=appliance_size, remote_access=True, dist=dist)
|
||||||
description=description)
|
|
||||||
appliance = self._assemble_edge_appliance(self.resource_pool_id,
|
appliance = self._assemble_edge_appliance(self.resource_pool_id,
|
||||||
self.datastore_id)
|
self.datastore_id)
|
||||||
if appliance:
|
if appliance:
|
||||||
|
@ -30,7 +30,6 @@ from neutron.common import exceptions as n_exc
|
|||||||
from neutron import context as q_context
|
from neutron import context as q_context
|
||||||
from neutron.extensions import l3
|
from neutron.extensions import l3
|
||||||
from neutron.plugins.common import constants as plugin_const
|
from neutron.plugins.common import constants as plugin_const
|
||||||
from neutron import version
|
|
||||||
|
|
||||||
from vmware_nsx._i18n import _, _LE, _LW
|
from vmware_nsx._i18n import _, _LE, _LW
|
||||||
from vmware_nsx.common import exceptions as nsx_exc
|
from vmware_nsx.common import exceptions as nsx_exc
|
||||||
@ -139,8 +138,7 @@ class EdgeManager(object):
|
|||||||
lrouter['id'], lrouter['name'], internal_network=None,
|
lrouter['id'], lrouter['name'], internal_network=None,
|
||||||
jobdata=jobdata, wait_for_exec=True,
|
jobdata=jobdata, wait_for_exec=True,
|
||||||
appliance_size=appliance_size,
|
appliance_size=appliance_size,
|
||||||
dist=(edge_type == nsxv_constants.VDR_EDGE), async=async,
|
dist=(edge_type == nsxv_constants.VDR_EDGE), async=async)
|
||||||
description=version.version_info.release_string())
|
|
||||||
return task
|
return task
|
||||||
|
|
||||||
def _deploy_backup_edges_on_db(self, context, num,
|
def _deploy_backup_edges_on_db(self, context, num,
|
||||||
@ -1417,8 +1415,7 @@ def create_lrouter(nsxv_manager, context, lrouter, lswitch=None, dist=False):
|
|||||||
# as we're not in a database transaction now
|
# as we're not in a database transaction now
|
||||||
task = nsxv_manager.deploy_edge(
|
task = nsxv_manager.deploy_edge(
|
||||||
router_id, router_name, internal_network=None,
|
router_id, router_name, internal_network=None,
|
||||||
dist=dist, jobdata=jobdata, appliance_size=appliance_size,
|
dist=dist, jobdata=jobdata, appliance_size=appliance_size)
|
||||||
description=version.version_info.release_string())
|
|
||||||
task.wait(task_const.TaskState.RESULT)
|
task.wait(task_const.TaskState.RESULT)
|
||||||
|
|
||||||
|
|
||||||
@ -1450,8 +1447,7 @@ def create_dhcp_service(context, nsxv_manager, network):
|
|||||||
# Deploy an Edge for dhcp service
|
# Deploy an Edge for dhcp service
|
||||||
return nsxv_manager.deploy_edge(
|
return nsxv_manager.deploy_edge(
|
||||||
network['id'], edge_name, nsx_network_id, jobdata=jobdata,
|
network['id'], edge_name, nsx_network_id, jobdata=jobdata,
|
||||||
appliance_size=vcns_const.SERVICE_SIZE_MAPPING['dhcp'],
|
appliance_size=vcns_const.SERVICE_SIZE_MAPPING['dhcp'])
|
||||||
description=version.version_info.release_string())
|
|
||||||
|
|
||||||
|
|
||||||
def delete_dhcp_service(context, nsxv_manager, network_id):
|
def delete_dhcp_service(context, nsxv_manager, network_id):
|
||||||
|
@ -22,7 +22,6 @@ from neutron.common import exceptions as n_exc
|
|||||||
from neutron import context
|
from neutron import context
|
||||||
from neutron.plugins.common import constants as plugin_const
|
from neutron.plugins.common import constants as plugin_const
|
||||||
from neutron.tests.unit import testlib_api
|
from neutron.tests.unit import testlib_api
|
||||||
from neutron import version
|
|
||||||
from vmware_nsx.common import nsxv_constants
|
from vmware_nsx.common import nsxv_constants
|
||||||
from vmware_nsx.db import nsxv_db
|
from vmware_nsx.db import nsxv_db
|
||||||
from vmware_nsx.plugins.nsx_v.vshield.common import (
|
from vmware_nsx.plugins.nsx_v.vshield.common import (
|
||||||
@ -132,8 +131,7 @@ class EdgeUtilsTestCase(EdgeUtilsTestCaseMixin):
|
|||||||
'lrouter': lrouter,
|
'lrouter': lrouter,
|
||||||
'lswitch': None,
|
'lswitch': None,
|
||||||
'context': self.ctx},
|
'context': self.ctx},
|
||||||
appliance_size=vcns_const.SERVICE_SIZE_MAPPING['router'],
|
appliance_size=vcns_const.SERVICE_SIZE_MAPPING['router'])
|
||||||
description=version.version_info.release_string())
|
|
||||||
|
|
||||||
|
|
||||||
class EdgeManagerTestCase(EdgeUtilsTestCaseMixin):
|
class EdgeManagerTestCase(EdgeUtilsTestCaseMixin):
|
||||||
|
Loading…
Reference in New Issue
Block a user