diff --git a/manifests/compute/serial.pp b/manifests/compute/serial.pp index 3f5bb4e83..e1b6a32b7 100644 --- a/manifests/compute/serial.pp +++ b/manifests/compute/serial.pp @@ -12,29 +12,38 @@ # (optional) URL that gets passed to the clients # Defaults to 'ws://127.0.0.1:6083/' # -# [*listen*] -# IP address on which instance serial console should listen -# Defaults to 127.0.0.1 -# # [*proxyclient_address*] # The address to which proxy clients (like nova-serialproxy) # should connect (string value) # Defaults to 127.0.0.1 # +# DEPRECATED PARAMETERS +# [*listen*] +# This option has no effect anymore. Please use "proxyclient_address" instead +# This option is deprecated and will be removed in future releases +# Defaults to undef +# class nova::compute::serial( $port_range = '10000:20000', $base_url = 'ws://127.0.0.1:6083/', - $listen = '127.0.0.1', $proxyclient_address = '127.0.0.1', + # DEPRECATED PARAMETERS + $listen = undef, ) { include ::nova::deps + if $listen { + warning('The listen parameter has no effect anymore, please use proxyclient_address instead.') + $proxyclient_address_real = $listen + } else { + $proxyclient_address_real = $proxyclient_address + } + nova_config { 'serial_console/enabled': value => true; 'serial_console/port_range': value => $port_range; 'serial_console/base_url': value => $base_url; - 'serial_console/listen': value => $listen; - 'serial_console/proxyclient_address': value => $proxyclient_address; + 'serial_console/proxyclient_address': value => $proxyclient_address_real; } } diff --git a/releasenotes/notes/deprecated_parameters-1275a2c1e42ad145.yaml b/releasenotes/notes/deprecated_parameters-1275a2c1e42ad145.yaml new file mode 100644 index 000000000..af4514e7a --- /dev/null +++ b/releasenotes/notes/deprecated_parameters-1275a2c1e42ad145.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - listen parameter from nova::compute::serial has no effect + anymore and will be removed in future. diff --git a/spec/classes/nova_compute_serial_spec.rb b/spec/classes/nova_compute_serial_spec.rb index c90b03aa8..64a2c06f9 100644 --- a/spec/classes/nova_compute_serial_spec.rb +++ b/spec/classes/nova_compute_serial_spec.rb @@ -4,18 +4,15 @@ describe 'nova::compute::serial' do it { is_expected.to contain_nova_config('serial_console/enabled').with_value('true') } it { is_expected.to contain_nova_config('serial_console/port_range').with_value('10000:20000')} it { is_expected.to contain_nova_config('serial_console/base_url').with_value('ws://127.0.0.1:6083/')} - it { is_expected.to contain_nova_config('serial_console/listen').with_value('127.0.0.1')} it { is_expected.to contain_nova_config('serial_console/proxyclient_address').with_value('127.0.0.1')} context 'when overriding params' do let :params do { - :proxyclient_address => '10.10.10.10', - :listen => '10.10.11.11', + :proxyclient_address => '10.10.10.10', } end it { is_expected.to contain_nova_config('serial_console/proxyclient_address').with_value('10.10.10.10')} - it { is_expected.to contain_nova_config('serial_console/listen').with_value('10.10.11.11')} end end