diff --git a/manifests/rootwrap.pp b/manifests/rootwrap.pp index 910725046..de4bb28b7 100644 --- a/manifests/rootwrap.pp +++ b/manifests/rootwrap.pp @@ -4,33 +4,42 @@ # # === Parameters: # +# DEPRECATED PARAMETERS +# # [*xenapi_connection_url*] # (optional) XenAPI connection URL. Only needed when target a XenServer/XCP # compute host's dom0 -# Defaults to $::os_service_default. +# Defaults to undef. # # [*xenapi_connection_username*] # (optional) XenAPI username. Only needed when target a XenServer/XCP # compute host's dom0 -# Defaults to $::os_service_default. +# Defaults to undef. # # [*xenapi_connection_password*] # (optional) XenAPI connection password. Only needed when target a XenServer/XCP # compute host's dom0 -# Defaults to $::os_service_default. +# Defaults to undef. # class neutron::rootwrap ( - $xenapi_connection_url = $::os_service_default, - $xenapi_connection_username = $::os_service_default, - $xenapi_connection_password = $::os_service_default, + # DEPRECATED PARAMETERS + $xenapi_connection_url = undef, + $xenapi_connection_username = undef, + $xenapi_connection_password = undef, ) { include neutron::deps - neutron_rootwrap_config { - 'xenapi/xenapi_connection_url': value => $xenapi_connection_url; - 'xenapi/xenapi_connection_username': value => $xenapi_connection_username; - 'xenapi/xenapi_connection_password': value => $xenapi_connection_password; + $deprecated_xenapi_param_names = [ + 'xenapi_connection_url', + 'xenapi_connection_username', + 'xenapi_connection_password', + ] + $deprecated_xenapi_param_names.each |$param_name| { + $param = getvar($param_name) + if $param != undef { + warning("The ${param_name} parameter is deprecated and has no effect.") + } } } diff --git a/releasenotes/notes/deprecate-xenapi-d97bb062fe508fbc.yaml b/releasenotes/notes/deprecate-xenapi-d97bb062fe508fbc.yaml new file mode 100644 index 000000000..d126a5ac3 --- /dev/null +++ b/releasenotes/notes/deprecate-xenapi-d97bb062fe508fbc.yaml @@ -0,0 +1,9 @@ +--- +deprecations: + - | + The following parameters of the ``neutron::rootwrap`` class have been + deprecated and have no effect. + + - ``xenapi_connection_url`` + - ``xenapi_connection_username`` + - ``xenapi_connection_password`` diff --git a/spec/classes/neutron_rootwrap_spec.rb b/spec/classes/neutron_rootwrap_spec.rb index 10d795ee5..d5aaed454 100644 --- a/spec/classes/neutron_rootwrap_spec.rb +++ b/spec/classes/neutron_rootwrap_spec.rb @@ -1,25 +1,14 @@ require 'spec_helper' describe 'neutron::rootwrap' do - let :pre_condition do - "class { 'neutron::agents::ml2::ovs': }" - end - let :params do - { :xenapi_connection_url => 'http://127.0.0.1', - :xenapi_connection_username => 'user', - :xenapi_connection_password => 'passw0rd', - } + {} end shared_examples 'neutron rootwrap' do - it 'configures rootwrap.conf' do - should contain_neutron_rootwrap_config('xenapi/xenapi_connection_url').with_value(params[:xenapi_connection_url]); - should contain_neutron_rootwrap_config('xenapi/xenapi_connection_username').with_value(params[:xenapi_connection_username]); - should contain_neutron_rootwrap_config('xenapi/xenapi_connection_password').with_value(params[:xenapi_connection_password]); + # Now this class doesn't have any effective parameters end - end on_supported_os({