spice: Ensure settings are purged by default

This change ensures the following parameters are purged by default.
 [spice] html5proxy_base_url
 [spice] server_listen

Currently these are left unmanaged by default, thus if a user set any
value then remove it later, puppet does not wipe out the parameter
settings added by the previous run.

Change-Id: I9878a6d2258ba32f44773c1b7c3da3dcac71e2a2
This commit is contained in:
Takashi Kajinami
2022-06-25 22:45:42 +09:00
parent 4466f7cde6
commit 4e668c52a9
2 changed files with 14 additions and 10 deletions

View File

@@ -10,7 +10,7 @@
#
# [*server_listen*]
# (optional) IP address on which instance spice servers should listen
# Defaults to undef
# Defaults to $::os_service_default
#
# [*server_proxyclient_address*]
# (optional) Management IP Address on which instance spiceservers will
@@ -34,13 +34,13 @@
# Defaults to '/spice_auto.html'
#
class nova::compute::spice(
$agent_enabled = true,
$server_listen = undef,
$server_proxyclient_address = '127.0.0.1',
$proxy_host = false,
$proxy_protocol = 'http',
$proxy_port = '6082',
$proxy_path = '/spice_auto.html',
$agent_enabled = true,
$server_listen = $::os_service_default,
$server_proxyclient_address = '127.0.0.1',
$proxy_host = false,
$proxy_protocol = 'http',
$proxy_port = '6082',
$proxy_path = '/spice_auto.html',
) {
include nova::deps
@@ -50,6 +50,10 @@ class nova::compute::spice(
nova_config {
'spice/html5proxy_base_url': value => $html5proxy_base_url;
}
} else {
nova_config {
'spice/html5proxy_base_url': value => $::os_service_default;
}
}
nova_config {

View File

@@ -4,8 +4,8 @@ describe 'nova::compute::spice' do
shared_examples 'nova::compute::spice' do
it { should contain_nova_config('spice/agent_enabled').with_value('true')}
it { should contain_nova_config('spice/server_proxyclient_address').with_value('127.0.0.1')}
it { should_not contain_nova_config('spice/html5proxy_base_url')}
it { should contain_nova_config('spice/server_listen').with_value(nil)}
it { should contain_nova_config('spice/html5proxy_base_url').with_value('<SERVICE DEFAULT>')}
it { should contain_nova_config('spice/server_listen').with_value('<SERVICE DEFAULT>')}
context 'when overriding params' do
let :params do