From 9643d2d848e607abbc22deb2bb733900f8b38ac2 Mon Sep 17 00:00:00 2001 From: Aaron Rosen Date: Tue, 7 Jul 2015 11:25:48 -0700 Subject: [PATCH] Split out nsx_user/pass to nsxv3 section The default password for nsx-t changed from admin to default which is different than the default for nsx-mh. This patch splits out the nsx-t user/pass config options to it's own section so the defaults are correct. In addition these should be in their own config section anyways. Change-Id: If785d46344b734c13217e0dec573fc5929bf8ffa --- vmware_nsx/neutron/plugins/vmware/common/config.py | 7 +++++++ vmware_nsx/neutron/plugins/vmware/nsxlib/v3/__init__.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/vmware_nsx/neutron/plugins/vmware/common/config.py b/vmware_nsx/neutron/plugins/vmware/common/config.py index cb24b6091d..390fae3dca 100644 --- a/vmware_nsx/neutron/plugins/vmware/common/config.py +++ b/vmware_nsx/neutron/plugins/vmware/common/config.py @@ -158,6 +158,13 @@ cluster_opts = [ ] nsx_v3_opts = [ + cfg.StrOpt('nsx_user', + default='admin', + help=_('User name for NSX controllers in this cluster')), + cfg.StrOpt('nsx_password', + default='default', + secret=True, + help=_('Password for NSX controllers in this cluster')), cfg.StrOpt('default_edge_cluster_uuid', help=_("Default edge cluster identifier"))] diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/__init__.py b/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/__init__.py index 3f535c396b..67428b2b0e 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/__init__.py +++ b/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/__init__.py @@ -31,8 +31,8 @@ def _get_controller_endpoint(): # NOTE: The same options defined for 'old' NSX controller connection can be # reused for connecting to next-gen NSX controllers controller = cfg.CONF.nsx_controllers[0] - username = cfg.CONF.nsx_user - password = cfg.CONF.nsx_password + username = cfg.CONF.nsx_v3.nsx_user + password = cfg.CONF.nsx_v3.nsx_password return "https://%s" % controller, username, password