Switch from the old nvp name to the new nsx name
This commit is contained in:
32
config.yaml
32
config.yaml
@@ -55,7 +55,7 @@ options:
|
||||
Neutron plugin to use for network management; supports
|
||||
.
|
||||
ovs - OpenvSwitch Plugin
|
||||
nvp - Nicira Network Virtualization Platform
|
||||
nsx - VMWare NSX
|
||||
.
|
||||
overlay-network-type:
|
||||
default: gre
|
||||
@@ -165,33 +165,29 @@ options:
|
||||
The CPU core multiplier to use when configuring worker processes for
|
||||
Neutron. By default, the number of workers for each daemon is set to
|
||||
twice the number of CPU cores a service unit has.
|
||||
# Neutron NVP and VMware NSX plugin configuration
|
||||
nvp-controllers:
|
||||
# VMware NSX plugin configuration
|
||||
nsx-controllers:
|
||||
type: string
|
||||
default:
|
||||
description: Space delimited addresses of NVP/NSX controllers
|
||||
nvp-username:
|
||||
description: Space delimited addresses of NSX controllers
|
||||
nsx-username:
|
||||
type: string
|
||||
default: admin
|
||||
description: Username to connect to NVP/NSX controllers with
|
||||
nvp-password:
|
||||
description: Username to connect to NSX controllers with
|
||||
nsx-password:
|
||||
type: string
|
||||
default: admin
|
||||
description: Password to connect to NVP/NSX controllers with
|
||||
nvp-cluster-name:
|
||||
type: string
|
||||
default: example
|
||||
description: Name of the NVP cluster configuration to create (grizzly only)
|
||||
nvp-tz-uuid:
|
||||
description: Password to connect to NSX controllers with
|
||||
nsx-tz-uuid:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
This is uuid of the default NVP/NSX Transport zone that will be used for
|
||||
This is uuid of the default NSX Transport zone that will be used for
|
||||
creating tunneled isolated Quantum networks. It needs to be created
|
||||
in NVP before starting Quantum with the nvp plugin.
|
||||
nvp-l3-uuid:
|
||||
in NSX before starting Quantum with the nsx plugin.
|
||||
nsx-l3-uuid:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
This is uuid of the default NVP/NSX L3 Gateway Service.
|
||||
# end of NVP/NSX configuration
|
||||
This is uuid of the default NSX L3 Gateway Service.
|
||||
# end of NSX configuration
|
||||
|
||||
@@ -81,16 +81,15 @@ class NeutronCCContext(context.NeutronContext):
|
||||
from neutron_api_utils import api_port
|
||||
ctxt = super(NeutronCCContext, self).__call__()
|
||||
if config('neutron-plugin') == 'nsx':
|
||||
ctxt['nvp_username'] = config('nvp-username')
|
||||
ctxt['nvp_password'] = config('nvp-password')
|
||||
ctxt['nvp_cluster_name'] = config('nvp-cluster-name')
|
||||
ctxt['nvp_tz_uuid'] = config('nvp-tz-uuid')
|
||||
ctxt['nvp_l3_uuid'] = config('nvp-l3-uuid')
|
||||
if 'nvp-controllers' in config():
|
||||
ctxt['nvp_controllers'] = \
|
||||
','.join(config('nvp-controllers').split())
|
||||
ctxt['nvp_controllers_list'] = \
|
||||
config('nvp-controllers').split()
|
||||
ctxt['nsx_username'] = config('nsx-username')
|
||||
ctxt['nsx_password'] = config('nsx-password')
|
||||
ctxt['nsx_tz_uuid'] = config('nsx-tz-uuid')
|
||||
ctxt['nsx_l3_uuid'] = config('nsx-l3-uuid')
|
||||
if 'nsx-controllers' in config():
|
||||
ctxt['nsx_controllers'] = \
|
||||
','.join(config('nsx-controllers').split())
|
||||
ctxt['nsx_controllers_list'] = \
|
||||
config('nsx-controllers').split()
|
||||
ctxt['l2_population'] = self.neutron_l2_population
|
||||
ctxt['overlay_network_type'] = self.neutron_overlay_network_type
|
||||
ctxt['external_network'] = config('neutron-external-network')
|
||||
|
||||
@@ -301,12 +301,12 @@ def neutron_api_relation_changed():
|
||||
def neutron_plugin_api_relation_joined(rid=None):
|
||||
if config('neutron-plugin') == 'nsx':
|
||||
relation_data = {
|
||||
'nvp-username': config('nvp-username'),
|
||||
'nvp-password': config('nvp-password'),
|
||||
'nvp-cluster-name': config('nvp-cluster-name'),
|
||||
'nvp-tz-uuid': config('nvp-tz-uuid'),
|
||||
'nvp-l3-uuid': config('nvp-l3-uuid'),
|
||||
'nvp-controllers': config('nvp-controllers'),
|
||||
'nsx-username': config('nsx-username'),
|
||||
'nsx-password': config('nsx-password'),
|
||||
'nsx-cluster-name': config('nsx-cluster-name'),
|
||||
'nsx-tz-uuid': config('nsx-tz-uuid'),
|
||||
'nsx-l3-uuid': config('nsx-l3-uuid'),
|
||||
'nsx-controllers': config('nsx-controllers'),
|
||||
}
|
||||
else:
|
||||
relation_data = {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
nsx_user = {{ nvp_username }}
|
||||
nsx_password = {{ nvp_password }}
|
||||
nsx_controllers = {{ nvp_controllers }}
|
||||
default_tz_uuid = {{ nvp_tz_uuid }}
|
||||
default_l3_gw_service_uuid = {{ nvp_l3_uuid }}
|
||||
nsx_user = {{ nsx_username }}
|
||||
nsx_password = {{ nsx_password }}
|
||||
nsx_controllers = {{ nsx_controllers }}
|
||||
default_tz_uuid = {{ nsx_tz_uuid }}
|
||||
default_l3_gw_service_uuid = {{ nsx_l3_uuid }}
|
||||
|
||||
@@ -135,12 +135,11 @@ class NeutronCCContextTest(CharmTestCase):
|
||||
self.test_config.set('debug', True)
|
||||
self.test_config.set('verbose', True)
|
||||
self.test_config.set('neutron-external-network', 'bob')
|
||||
self.test_config.set('nvp-username', 'bob')
|
||||
self.test_config.set('nvp-password', 'hardpass')
|
||||
self.test_config.set('nvp-cluster-name', 'nsxclus')
|
||||
self.test_config.set('nvp-tz-uuid', 'tzuuid')
|
||||
self.test_config.set('nvp-l3-uuid', 'l3uuid')
|
||||
self.test_config.set('nvp-controllers', 'ctrl1 ctrl2')
|
||||
self.test_config.set('nsx-username', 'bob')
|
||||
self.test_config.set('nsx-password', 'hardpass')
|
||||
self.test_config.set('nsx-tz-uuid', 'tzuuid')
|
||||
self.test_config.set('nsx-l3-uuid', 'l3uuid')
|
||||
self.test_config.set('nsx-controllers', 'ctrl1 ctrl2')
|
||||
|
||||
def tearDown(self):
|
||||
super(NeutronCCContextTest, self).tearDown()
|
||||
@@ -225,13 +224,12 @@ class NeutronCCContextTest(CharmTestCase):
|
||||
self.test_config.set('neutron-plugin', 'nsx')
|
||||
napi_ctxt = context.NeutronCCContext()()
|
||||
expect = {
|
||||
'nvp_cluster_name': 'nsxclus',
|
||||
'nvp_controllers': 'ctrl1,ctrl2',
|
||||
'nvp_controllers_list': ['ctrl1', 'ctrl2'],
|
||||
'nvp_l3_uuid': 'l3uuid',
|
||||
'nvp_password': 'hardpass',
|
||||
'nvp_tz_uuid': 'tzuuid',
|
||||
'nvp_username': 'bob',
|
||||
'nsx_controllers': 'ctrl1,ctrl2',
|
||||
'nsx_controllers_list': ['ctrl1', 'ctrl2'],
|
||||
'nsx_l3_uuid': 'l3uuid',
|
||||
'nsx_password': 'hardpass',
|
||||
'nsx_tz_uuid': 'tzuuid',
|
||||
'nsx_username': 'bob',
|
||||
}
|
||||
for key in expect.iterkeys():
|
||||
self.assertEquals(napi_ctxt[key], expect[key])
|
||||
|
||||
Reference in New Issue
Block a user