diff --git a/manifests/neutron.pp b/manifests/neutron.pp index abd7017c..481530ae 100644 --- a/manifests/neutron.pp +++ b/manifests/neutron.pp @@ -4,6 +4,9 @@ # # === Parameters: # +# [*password*] +# (Required) Password for user +# # [*auth_url*] # (Optional) Keystone Authentication URL # Defaults to 'http://localhost:5000' @@ -12,10 +15,6 @@ # (Optional) User for accessing neutron # Defaults to 'neutron' # -# [*password*] -# (Optional) Password for user. This will be required in a future release. -# Defaults to $facts['os_service_default'] -# # [*project_name*] # (Optional) Tenant for accessing neutron # Defaults to 'services' @@ -53,9 +52,9 @@ # Defaults to $facts['os_service_default'] # class octavia::neutron ( + $password, $auth_url = 'http://localhost:5000', $username = 'neutron', - $password = $facts['os_service_default'], $project_name = 'services', $user_domain_name = 'Default', $project_domain_name = 'Default', @@ -69,10 +68,6 @@ class octavia::neutron ( include octavia::deps - if is_service_default($password) { - warning('[neutron] section will require valid credential options in a future release') - } - if is_service_default($system_scope) { $project_name_real = $project_name $project_domain_name_real = $project_domain_name diff --git a/releasenotes/notes/octavia-neutron-class-a4fd7a5c86dab7d5.yaml b/releasenotes/notes/octavia-neutron-class-a4fd7a5c86dab7d5.yaml new file mode 100644 index 00000000..6f761562 --- /dev/null +++ b/releasenotes/notes/octavia-neutron-class-a4fd7a5c86dab7d5.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The ``octavia::neutron`` class is now required and atleast the ``password`` + should be configured but you should verify that ``auth_url`` and other + parameters is specified correctly. diff --git a/spec/classes/octavia_neutron_spec.rb b/spec/classes/octavia_neutron_spec.rb index 0f314558..9caf0f1c 100644 --- a/spec/classes/octavia_neutron_spec.rb +++ b/spec/classes/octavia_neutron_spec.rb @@ -2,11 +2,17 @@ require 'spec_helper' describe 'octavia::neutron' do shared_examples 'octavia::neutron' do + let :params do + { + :password => 'secret', + } + end + context 'with default parameters' do it { is_expected.to contain_octavia_config('neutron/auth_url').with_value('http://localhost:5000') is_expected.to contain_octavia_config('neutron/username').with_value('neutron') - is_expected.to contain_octavia_config('neutron/password').with_value('').with_secret(true) + is_expected.to contain_octavia_config('neutron/password').with_value('secret').with_secret(true) is_expected.to contain_octavia_config('neutron/project_name').with_value('services') is_expected.to contain_octavia_config('neutron/user_domain_name').with_value('Default') is_expected.to contain_octavia_config('neutron/project_domain_name').with_value('Default') @@ -20,8 +26,8 @@ describe 'octavia::neutron' do end context 'with specified parameters' do - let :params do - { + before do + params.merge!({ :auth_url => 'http://127.0.0.1:5000', :username => 'some_user', :password => 'secrete', @@ -33,7 +39,7 @@ describe 'octavia::neutron' do :service_name => 'networking', :endpoint_override => 'http://127.0.0.1:9696', :valid_interfaces => ['internal', 'public'], - } + }) end it { @@ -53,10 +59,10 @@ describe 'octavia::neutron' do end context 'when system_scope is set' do - let :params do - { + before do + params.merge!({ :system_scope => 'all' - } + }) end it 'configures system-scoped credential' do is_expected.to contain_octavia_config('neutron/project_domain_name').with_value('')