From a8b631e0972de6f965e43a02d64dba377e58490f Mon Sep 17 00:00:00 2001 From: Qasim Sarfraz Date: Mon, 23 May 2016 11:38:37 +0500 Subject: [PATCH] New config parameters for PLUMgrid Neutron plugin This patch set will enable PLUMgrid Neutron plugin to switch to keystone v3. It also adds new parameter, related to PLUMgrid metadata implemetation Doc-ref: https://wiki.openstack.org/wiki/PLUMgrid-Neutron Change-Id: Ibf5b5f7430035291d7bb89fe6ec744746c909903 --- manifests/plugins/plumgrid.pp | 16 ++++++++++++++-- .../update_plumgrid_config-82f3f631917f0e50.yaml | 10 ++++++++++ spec/classes/neutron_plugins_plumgrid_spec.rb | 6 +++++- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/update_plumgrid_config-82f3f631917f0e50.yaml diff --git a/manifests/plugins/plumgrid.pp b/manifests/plugins/plumgrid.pp index ed769d0ec..22571c1ea 100644 --- a/manifests/plugins/plumgrid.pp +++ b/manifests/plugins/plumgrid.pp @@ -40,7 +40,11 @@ # # [*identity_version*] # Keystone identity version -# Defaults to v2.0 +# Defaults to v3 +# +# [*user_domain_name*] +# Keystone user domain name +# Defaults to Default # # [*nova_metadata_ip*] # Nova metadata IP @@ -50,6 +54,10 @@ # Nova metadata port # Defaults to 8775 # +# [*nova_metadata_subnet*] +# Nova metadata subnet +# Defaults to 127.0.0.1/24 +# # [*metadata_proxy_shared_secret*] # Neutron metadata shared secret key # Defaults to $::os_service_default @@ -93,9 +101,11 @@ class neutron::plugins::plumgrid ( $admin_password = $::os_service_default, $controller_priv_host = '127.0.0.1', $auth_protocol = 'http', - $identity_version = 'v2.0', + $identity_version = 'v3', + $user_domain_name = 'Default', $nova_metadata_ip = '127.0.0.1', $nova_metadata_port = '8775', + $nova_metadata_subnet = '127.0.0.1/24', $metadata_proxy_shared_secret = $::os_service_default, $connector_type = 'distributed', $l2gateway_vendor = $::os_service_default, @@ -180,10 +190,12 @@ class neutron::plugins::plumgrid ( 'keystone_authtoken/auth_uri': value => "${auth_protocol}://${controller_priv_host}:35357/${identity_version}"; 'keystone_authtoken/admin_tenant_name': value => 'admin'; 'keystone_authtoken/identity_version': value => $identity_version; + 'keystone_authtoken/user_domain_name': value => $user_domain_name; 'PLUMgridMetadata/enable_pg_metadata' : value => 'True'; 'PLUMgridMetadata/metadata_mode': value => 'local'; 'PLUMgridMetadata/nova_metadata_ip': value => $nova_metadata_ip; 'PLUMgridMetadata/nova_metadata_port': value => $nova_metadata_port; + 'PLUMgridMetadata/nova_metadata_subnet': value => $nova_metadata_subnet; 'PLUMgridMetadata/metadata_proxy_shared_secret': value => $metadata_proxy_shared_secret; 'ConnectorType/connector_type': value => $connector_type; 'l2gateway/vendor': value => $l2gateway_vendor; diff --git a/releasenotes/notes/update_plumgrid_config-82f3f631917f0e50.yaml b/releasenotes/notes/update_plumgrid_config-82f3f631917f0e50.yaml new file mode 100644 index 000000000..b65050b7e --- /dev/null +++ b/releasenotes/notes/update_plumgrid_config-82f3f631917f0e50.yaml @@ -0,0 +1,10 @@ +--- +fixes: + - PLUMgrid neutron plugin assumes the default + keystone v2 for a given deployment. The issue + is fixed by switching the default config to + keystone v3. + - PLUMgrid neutron plugin isn't able to specify + nova metadata subnet, that is used by PLUMgrid + metadata implementation. The issue is fixed + by making nova_metadata_subnet configurable. diff --git a/spec/classes/neutron_plugins_plumgrid_spec.rb b/spec/classes/neutron_plugins_plumgrid_spec.rb index 92e27c013..06f633973 100644 --- a/spec/classes/neutron_plugins_plumgrid_spec.rb +++ b/spec/classes/neutron_plugins_plumgrid_spec.rb @@ -15,9 +15,11 @@ describe 'neutron::plugins::plumgrid' do :connection => 'http://127.0.0.1:35357/v2.0', :controller_priv_host => '127.0.0.1', :auth_protocol => 'http', - :identity_version => 'v2.0', + :identity_version => 'v3', + :user_domain_name => 'Default', :nova_metadata_ip => '127.0.0.1', :nova_metadata_port => '8775', + :nova_metadata_subnet => '127.0.0.1/24', :connector_type => 'distributed', :purge_config => false, } @@ -79,10 +81,12 @@ describe 'neutron::plugins::plumgrid' do auth_uri = params[:auth_protocol] + "://" + params[:controller_priv_host] + ":" + "35357/" + params[:identity_version]; is_expected.to contain_neutron_plumlib_plumgrid('keystone_authtoken/auth_uri').with_value(auth_uri) is_expected.to contain_neutron_plumlib_plumgrid('keystone_authtoken/identity_version').with_value(params[:identity_version]) + is_expected.to contain_neutron_plumlib_plumgrid('keystone_authtoken/user_domain_name').with_value(params[:user_domain_name]) is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/enable_pg_metadata').with_value('True') is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/metadata_mode').with_value('local') is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/nova_metadata_ip').with_value(params[:nova_metadata_ip]) is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/nova_metadata_port').with_value(params[:nova_metadata_port]) + is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/nova_metadata_subnet').with_value(params[:nova_metadata_subnet]) is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/metadata_proxy_shared_secret').with_value('') is_expected.to contain_neutron_plumlib_plumgrid('ConnectorType/connector_type').with_value('distributed') is_expected.to contain_neutron_plumlib_plumgrid('l2gateway/vendor').with_value('')