Merge "Deprecate listen parameter"
This commit is contained in:
@@ -12,29 +12,38 @@
|
|||||||
# (optional) URL that gets passed to the clients
|
# (optional) URL that gets passed to the clients
|
||||||
# Defaults to 'ws://127.0.0.1:6083/'
|
# 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*]
|
# [*proxyclient_address*]
|
||||||
# The address to which proxy clients (like nova-serialproxy)
|
# The address to which proxy clients (like nova-serialproxy)
|
||||||
# should connect (string value)
|
# should connect (string value)
|
||||||
# Defaults to 127.0.0.1
|
# 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(
|
class nova::compute::serial(
|
||||||
$port_range = '10000:20000',
|
$port_range = '10000:20000',
|
||||||
$base_url = 'ws://127.0.0.1:6083/',
|
$base_url = 'ws://127.0.0.1:6083/',
|
||||||
$listen = '127.0.0.1',
|
|
||||||
$proxyclient_address = '127.0.0.1',
|
$proxyclient_address = '127.0.0.1',
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$listen = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::deps
|
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 {
|
nova_config {
|
||||||
'serial_console/enabled': value => true;
|
'serial_console/enabled': value => true;
|
||||||
'serial_console/port_range': value => $port_range;
|
'serial_console/port_range': value => $port_range;
|
||||||
'serial_console/base_url': value => $base_url;
|
'serial_console/base_url': value => $base_url;
|
||||||
'serial_console/listen': value => $listen;
|
'serial_console/proxyclient_address': value => $proxyclient_address_real;
|
||||||
'serial_console/proxyclient_address': value => $proxyclient_address;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- listen parameter from nova::compute::serial has no effect
|
||||||
|
anymore and will be removed in future.
|
@@ -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/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/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/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')}
|
it { is_expected.to contain_nova_config('serial_console/proxyclient_address').with_value('127.0.0.1')}
|
||||||
|
|
||||||
context 'when overriding params' do
|
context 'when overriding params' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:proxyclient_address => '10.10.10.10',
|
:proxyclient_address => '10.10.10.10',
|
||||||
:listen => '10.10.11.11',
|
|
||||||
}
|
}
|
||||||
end
|
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/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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user