From 7104f1f818fc40f6194a83d3f93c5a5dc0ceec61 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 3 Jan 2025 11:10:01 +0900 Subject: [PATCH] Drop redundant default for server_proxyclient_address options These options default to 127.0.0.1, so we don't have to define explicit defaults in the module. Change-Id: Ic6074a8f652b71046a3dfc636e0b5c795cb7858c --- manifests/compute.pp | 2 +- manifests/compute/spice.pp | 4 ++-- spec/classes/nova_compute_spec.rb | 4 ++-- spec/classes/nova_compute_spice_spec.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/compute.pp b/manifests/compute.pp index 5feed8d6b..0ab2dc372 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -268,7 +268,7 @@ class nova::compute ( $ensure_package = 'present', Boolean $vnc_enabled = true, Boolean $spice_enabled = false, - $vncserver_proxyclient_address = '127.0.0.1', + $vncserver_proxyclient_address = $facts['os_service_default'], $vncproxy_host = undef, $vncproxy_protocol = 'http', $vncproxy_port = '6080', diff --git a/manifests/compute/spice.pp b/manifests/compute/spice.pp index 1a446792c..5136efdea 100644 --- a/manifests/compute/spice.pp +++ b/manifests/compute/spice.pp @@ -15,7 +15,7 @@ # [*server_proxyclient_address*] # (optional) Management IP Address on which instance spiceservers will # listen on the compute host. -# Defaults to '127.0.0.1' +# Defaults to $facts['os_service_default'] # # [*proxy_host*] # (optional) Host for the html5 console proxy @@ -36,7 +36,7 @@ class nova::compute::spice( Boolean $agent_enabled = true, $server_listen = $facts['os_service_default'], - $server_proxyclient_address = '127.0.0.1', + $server_proxyclient_address = $facts['os_service_default'], $proxy_host = undef, $proxy_protocol = 'http', $proxy_port = '6082', diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index 4d2097059..67798419b 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -27,7 +27,7 @@ describe 'nova::compute' do it 'does not configure vncproxy base url in nova.conf' do is_expected.to contain_nova_config('vnc/enabled').with_value(true) is_expected.to_not contain_nova_config('vnc/novncproxy_base_url') - is_expected.to contain_nova_config('vnc/server_proxyclient_address').with_value('127.0.0.1') + is_expected.to contain_nova_config('vnc/server_proxyclient_address').with_value('') end it 'should have spice disabled' do @@ -136,7 +136,7 @@ describe 'nova::compute' do it 'configures vnc in nova.conf' do is_expected.to contain_nova_config('vnc/enabled').with_value(true) - is_expected.to contain_nova_config('vnc/server_proxyclient_address').with_value('127.0.0.1') + is_expected.to contain_nova_config('vnc/server_proxyclient_address').with_value('') is_expected.to contain_nova_config('vnc/novncproxy_base_url').with_value( 'http://127.0.0.1:6080/vnc_auto.html' ) diff --git a/spec/classes/nova_compute_spice_spec.rb b/spec/classes/nova_compute_spice_spec.rb index c8a85c0d5..a611f7f8f 100644 --- a/spec/classes/nova_compute_spice_spec.rb +++ b/spec/classes/nova_compute_spice_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' 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 contain_nova_config('spice/server_proxyclient_address').with_value('')} it { should contain_nova_config('spice/html5proxy_base_url').with_value('')} it { should contain_nova_config('spice/server_listen').with_value('')}