Fix bug for deprecated vnc options.
The vnc options has been moved to [vnc] section in Liberty. Closes-Bug: #1533257 Change-Id: Ib0a8d305f7762bc871cf487a6abd11f22d6a5b14
This commit is contained in:
parent
4a9ba6ac29
commit
bc17d4cd74
|
@ -164,18 +164,18 @@ class nova::compute (
|
|||
include ::nova::vncproxy::common
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/vncserver_proxyclient_address': value =>
|
||||
'vnc/vncserver_proxyclient_address': value =>
|
||||
$vncserver_proxyclient_address;
|
||||
'DEFAULT/vnc_keymap': value => $vnc_keymap;
|
||||
'vnc/keymap': value => $vnc_keymap;
|
||||
}
|
||||
} else {
|
||||
nova_config {
|
||||
'DEFAULT/vncserver_proxyclient_address': ensure => absent;
|
||||
'DEFAULT/vnc_keymap': ensure => absent;
|
||||
'vnc/vncserver_proxyclient_address': ensure => absent;
|
||||
'vnc/keymap': ensure => absent;
|
||||
}
|
||||
}
|
||||
nova_config {
|
||||
'DEFAULT/vnc_enabled': value => $vnc_enabled;
|
||||
'vnc/enabled': value => $vnc_enabled;
|
||||
}
|
||||
|
||||
if $neutron_enabled != true and $install_bridge_utils {
|
||||
|
|
|
@ -185,7 +185,7 @@ class nova::compute::libvirt (
|
|||
|
||||
nova_config {
|
||||
'DEFAULT/compute_driver': value => $compute_driver;
|
||||
'DEFAULT/vncserver_listen': value => $vncserver_listen;
|
||||
'vnc/vncserver_listen': value => $vncserver_listen;
|
||||
'libvirt/virt_type': value => $libvirt_virt_type;
|
||||
'libvirt/cpu_mode': value => $libvirt_cpu_mode_real;
|
||||
'libvirt/inject_password': value => $libvirt_inject_password;
|
||||
|
|
|
@ -50,7 +50,7 @@ class nova::vncproxy::common (
|
|||
$vncproxy_base_url = "${vncproxy_protocol_real}://${vncproxy_host_real}:${vncproxy_port_real}${vncproxy_path_real}"
|
||||
# config for vnc proxy
|
||||
nova_config {
|
||||
'DEFAULT/novncproxy_base_url': value => $vncproxy_base_url;
|
||||
'vnc/novncproxy_base_url': value => $vncproxy_base_url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ describe 'nova::compute::libvirt' do
|
|||
it { is_expected.to contain_nova_config('libvirt/inject_password').with_value(false)}
|
||||
it { is_expected.to contain_nova_config('libvirt/inject_key').with_value(false)}
|
||||
it { is_expected.to contain_nova_config('libvirt/inject_partition').with_value(-2)}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vncserver_listen').with_value('127.0.0.1')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('127.0.0.1')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_base_images').with_ensure('absent')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_original_minimum_age_seconds').with_ensure('absent')}
|
||||
it { is_expected.to contain_nova_config('libvirt/remove_unused_kernels').with_ensure('absent')}
|
||||
|
@ -75,7 +75,7 @@ describe 'nova::compute::libvirt' do
|
|||
it { is_expected.to contain_nova_config('libvirt/cpu_mode').with_value('host-passthrough')}
|
||||
it { is_expected.to contain_nova_config('libvirt/cpu_model').with_ensure('absent')}
|
||||
it { is_expected.to contain_nova_config('libvirt/disk_cachemodes').with_value('file=directsync,block=none')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vncserver_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_base_images').with_value(true)}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_original_minimum_age_seconds').with_value(3600)}
|
||||
it { is_expected.to contain_nova_config('libvirt/remove_unused_kernels').with_value(true)}
|
||||
|
@ -110,7 +110,7 @@ describe 'nova::compute::libvirt' do
|
|||
end
|
||||
|
||||
it { is_expected.to contain_class('nova::migration::libvirt')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vncserver_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_file_line('/etc/default/libvirt-bin libvirtd opts').with(:line => 'libvirtd_opts="-d -l"') }
|
||||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_tls').with(:line => "listen_tls = 0") }
|
||||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_tcp').with(:line => "listen_tcp = 1") }
|
||||
|
@ -125,7 +125,7 @@ describe 'nova::compute::libvirt' do
|
|||
end
|
||||
|
||||
it { is_expected.to contain_class('nova::migration::libvirt')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vncserver_listen').with_value('::0')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('::0')}
|
||||
it { is_expected.to contain_file_line('/etc/default/libvirt-bin libvirtd opts').with(:line => 'libvirtd_opts="-d -l"') }
|
||||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_tls').with(:line => "listen_tls = 0") }
|
||||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_tcp').with(:line => "listen_tcp = 1") }
|
||||
|
@ -217,7 +217,7 @@ describe 'nova::compute::libvirt' do
|
|||
it { is_expected.to contain_nova_config('libvirt/inject_password').with_value(false)}
|
||||
it { is_expected.to contain_nova_config('libvirt/inject_key').with_value(false)}
|
||||
it { is_expected.to contain_nova_config('libvirt/inject_partition').with_value(-2)}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vncserver_listen').with_value('127.0.0.1')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('127.0.0.1')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_base_images').with_ensure('absent')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_original_minimum_age_seconds').with_ensure('absent')}
|
||||
it { is_expected.to contain_nova_config('libvirt/remove_unused_kernels').with_ensure('absent')}
|
||||
|
@ -236,7 +236,7 @@ describe 'nova::compute::libvirt' do
|
|||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('libvirt/virt_type').with_value('qemu')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vncserver_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_base_images').with_value(true)}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/remove_unused_original_minimum_age_seconds').with_value(3600)}
|
||||
it { is_expected.to contain_nova_config('libvirt/remove_unused_kernels').with_value(true)}
|
||||
|
@ -256,7 +256,7 @@ describe 'nova::compute::libvirt' do
|
|||
end
|
||||
|
||||
it { is_expected.to contain_class('nova::migration::libvirt')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vncserver_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('0.0.0.0')}
|
||||
it { is_expected.to contain_file_line('/etc/sysconfig/libvirtd libvirtd args').with(:line => 'LIBVIRTD_ARGS="--listen"') }
|
||||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_tls').with(:line => "listen_tls = 0") }
|
||||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_tcp').with(:line => "listen_tcp = 1") }
|
||||
|
@ -271,7 +271,7 @@ describe 'nova::compute::libvirt' do
|
|||
end
|
||||
|
||||
it { is_expected.to contain_class('nova::migration::libvirt')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vncserver_listen').with_value('::0')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('::0')}
|
||||
it { is_expected.to contain_file_line('/etc/sysconfig/libvirtd libvirtd args').with(:line => 'LIBVIRTD_ARGS="--listen"') }
|
||||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_tls').with(:line => "listen_tls = 0") }
|
||||
it { is_expected.to contain_file_line('/etc/libvirt/libvirtd.conf listen_tcp').with(:line => "listen_tcp = 1") }
|
||||
|
@ -319,7 +319,7 @@ describe 'nova::compute::libvirt' do
|
|||
|
||||
it { is_expected.to contain_nova_config('DEFAULT/compute_driver').with_value('libvirt.LibvirtDriver')}
|
||||
it { is_expected.to contain_nova_config('libvirt/virt_type').with_value('kvm')}
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vncserver_listen').with_value('127.0.0.1')}
|
||||
it { is_expected.to contain_nova_config('vnc/vncserver_listen').with_value('127.0.0.1')}
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ describe 'nova::compute' do
|
|||
|
||||
it { is_expected.to contain_nova_config('DEFAULT/network_device_mtu').with(:ensure => 'absent') }
|
||||
it { is_expected.to contain_nova_config('DEFAULT/allow_resize_to_same_host').with(:value => 'false') }
|
||||
it { is_expected.to_not contain_nova_config('DEFAULT/novncproxy_base_url') }
|
||||
it { is_expected.to_not contain_nova_config('vnc/novncproxy_base_url') }
|
||||
|
||||
|
||||
it { is_expected.to_not contain_package('bridge-utils').with(
|
||||
|
@ -90,10 +90,10 @@ describe 'nova::compute' do
|
|||
end
|
||||
|
||||
it 'configures vnc in nova.conf' do
|
||||
is_expected.to contain_nova_config('DEFAULT/vnc_enabled').with_value(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/vncserver_proxyclient_address').with_value('127.0.0.1')
|
||||
is_expected.to contain_nova_config('DEFAULT/vnc_keymap').with_value('en-us')
|
||||
is_expected.to contain_nova_config('DEFAULT/novncproxy_base_url').with_value(
|
||||
is_expected.to contain_nova_config('vnc/enabled').with_value(true)
|
||||
is_expected.to contain_nova_config('vnc/vncserver_proxyclient_address').with_value('127.0.0.1')
|
||||
is_expected.to contain_nova_config('vnc/keymap').with_value('en-us')
|
||||
is_expected.to contain_nova_config('vnc/novncproxy_base_url').with_value(
|
||||
'http://127.0.0.1:6080/vnc_auto.html'
|
||||
)
|
||||
end
|
||||
|
@ -152,10 +152,10 @@ describe 'nova::compute' do
|
|||
end
|
||||
|
||||
it 'disables vnc in nova.conf' do
|
||||
is_expected.to contain_nova_config('DEFAULT/vnc_enabled').with_value(false)
|
||||
is_expected.to contain_nova_config('DEFAULT/vncserver_proxyclient_address').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/vnc_keymap').with_ensure('absent')
|
||||
is_expected.to_not contain_nova_config('DEFAULT/novncproxy_base_url')
|
||||
is_expected.to contain_nova_config('vnc/enabled').with_value(false)
|
||||
is_expected.to contain_nova_config('vnc/vncserver_proxyclient_address').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('vnc/keymap').with_ensure('absent')
|
||||
is_expected.to_not contain_nova_config('vnc/novncproxy_base_url')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -210,7 +210,7 @@ describe 'nova::compute' do
|
|||
{ :vnc_keymap => 'fr', }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('DEFAULT/vnc_keymap').with_value('fr') }
|
||||
it { is_expected.to contain_nova_config('vnc/keymap').with_value('fr') }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ describe 'nova::vncproxy' do
|
|||
|
||||
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_host').with(:value => '0.0.0.0') }
|
||||
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_port').with(:value => '6080') }
|
||||
it { is_expected.to contain_nova_config('DEFAULT/novncproxy_base_url').with(:value => 'http://0.0.0.0:6080/vnc_auto.html') }
|
||||
it { is_expected.to contain_nova_config('vnc/novncproxy_base_url').with(:value => 'http://0.0.0.0:6080/vnc_auto.html') }
|
||||
|
||||
it { is_expected.to contain_package('nova-vncproxy').with(
|
||||
:name => 'nova-novncproxy',
|
||||
|
|
Loading…
Reference in New Issue