Merge "vnc and spice keymap are deprecated"
This commit is contained in:
commit
12d59ac874
|
@ -49,10 +49,6 @@
|
|||
# (optional) The path at the end of the uri for communication with the VNC proxy server
|
||||
# Defaults to '/vnc_auto.html'
|
||||
#
|
||||
# [*vnc_keymap*]
|
||||
# (optional) The keymap to use with VNC (ls -alh /usr/share/qemu/keymaps to list available keymaps)
|
||||
# Defaults to 'en-us'
|
||||
#
|
||||
# [*force_config_drive*]
|
||||
# (optional) Whether to force the config drive to be attached to all VMs
|
||||
# Defaults to false
|
||||
|
@ -181,6 +177,12 @@
|
|||
# tunneled networks.
|
||||
# Defaults to []
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*vnc_keymap*]
|
||||
# (optional) The keymap to use with VNC (ls -alh /usr/share/qemu/keymaps to list available keymaps)
|
||||
# Defaults to undef
|
||||
#
|
||||
class nova::compute (
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
|
@ -192,7 +194,6 @@ class nova::compute (
|
|||
$vncproxy_protocol = 'http',
|
||||
$vncproxy_port = '6080',
|
||||
$vncproxy_path = '/vnc_auto.html',
|
||||
$vnc_keymap = 'en-us',
|
||||
$force_config_drive = false,
|
||||
$virtio_nic = false,
|
||||
$neutron_enabled = true,
|
||||
|
@ -220,6 +221,8 @@ class nova::compute (
|
|||
$reserved_huge_pages = $::os_service_default,
|
||||
$neutron_physnets_numa_nodes_mapping = {},
|
||||
$neutron_tunnel_numa_nodes = [],
|
||||
# DEPRECATED PARAMETERS
|
||||
$vnc_keymap = undef,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -231,6 +234,10 @@ class nova::compute (
|
|||
include ::nova::pci
|
||||
include ::nova::compute::vgpu
|
||||
|
||||
if $vnc_keymap {
|
||||
warning('vnc_keymap parameter is deprecated, has no effect and will be removed in the future.')
|
||||
}
|
||||
|
||||
if ($vnc_enabled and $spice_enabled) {
|
||||
fail('vnc_enabled and spice_enabled is mutually exclusive')
|
||||
}
|
||||
|
@ -308,14 +315,11 @@ class nova::compute (
|
|||
include ::nova::vncproxy::common
|
||||
|
||||
nova_config {
|
||||
'vnc/vncserver_proxyclient_address': value =>
|
||||
$vncserver_proxyclient_address;
|
||||
'vnc/keymap': value => $vnc_keymap;
|
||||
'vnc/vncserver_proxyclient_address': value => $vncserver_proxyclient_address;
|
||||
}
|
||||
} else {
|
||||
nova_config {
|
||||
'vnc/vncserver_proxyclient_address': ensure => absent;
|
||||
'vnc/keymap': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,6 @@
|
|||
# listen on the compute host.
|
||||
# Defaults to '127.0.0.1'
|
||||
#
|
||||
# [*keymap*]
|
||||
# (optional) keymap for spice
|
||||
# Defaults to 'en-us'
|
||||
#
|
||||
# [*proxy_host*]
|
||||
# (optional) Host for the html5 console proxy
|
||||
# Defaults to false
|
||||
|
@ -37,19 +33,30 @@
|
|||
# (optional) Path of the spice html file for the html5 console proxy
|
||||
# Defaults to '/spice_auto.html'
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*keymap*]
|
||||
# (optional) keymap for spice
|
||||
# Defaults to undef
|
||||
#
|
||||
class nova::compute::spice(
|
||||
$agent_enabled = true,
|
||||
$server_listen = undef,
|
||||
$server_proxyclient_address = '127.0.0.1',
|
||||
$keymap = 'en-us',
|
||||
$proxy_host = false,
|
||||
$proxy_protocol = 'http',
|
||||
$proxy_port = '6082',
|
||||
$proxy_path = '/spice_auto.html'
|
||||
$proxy_path = '/spice_auto.html',
|
||||
# DEPRECATED PARAMETERS
|
||||
$keymap = undef,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
|
||||
if $keymap {
|
||||
warning('keymap parameter is deprecated, has no effect and will be removed in the future.')
|
||||
}
|
||||
|
||||
if $proxy_host {
|
||||
$html5proxy_base_url = "${proxy_protocol}://${proxy_host}:${proxy_port}${proxy_path}"
|
||||
nova_config {
|
||||
|
@ -61,6 +68,5 @@ class nova::compute::spice(
|
|||
'spice/agent_enabled': value => $agent_enabled;
|
||||
'spice/server_listen': value => $server_listen;
|
||||
'spice/server_proxyclient_address': value => $server_proxyclient_address;
|
||||
'spice/keymap': value => $keymap;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
deprecations:
|
||||
- nova::compute::vnc_keymap option isnow deprecated for removal, the
|
||||
parameter has no effect.
|
||||
- nova::compute::spice::keymap option is now deprecated for removal,
|
||||
the parameter has no effect.
|
|
@ -122,7 +122,6 @@ 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/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'
|
||||
)
|
||||
|
@ -266,7 +265,6 @@ describe 'nova::compute' do
|
|||
it 'disables vnc in nova.conf' do
|
||||
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
|
||||
|
||||
|
@ -331,13 +329,6 @@ describe 'nova::compute' do
|
|||
it { is_expected.to contain_nova_config('DEFAULT/instance_usage_audit_period').with_value('year') }
|
||||
end
|
||||
|
||||
context 'with vnc_keymap set to fr' do
|
||||
let :params do
|
||||
{ :vnc_keymap => 'fr', }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('vnc/keymap').with_value('fr') }
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
|
Loading…
Reference in New Issue