Adds vnc_keymap support

The nova.conf file handle a configuration option called vnc_keymap.
This option let operators define which keymap will be used in VNC
sessions.

This commit will let puppet handle this option in nova.conf.

vnc_keymap is an optional parameters and its default value is
'en-us'.

Change-Id: I7ba49a0ef1e48adbf757c7515a67960d0007a8f5
Closes-Bug: 1325585
This commit is contained in:
Arnaud Morin
2014-06-02 16:11:50 +02:00
parent 7dfb878bc2
commit 4b4de89d09
2 changed files with 13 additions and 0 deletions

View File

@@ -40,6 +40,10 @@
# (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
@@ -75,6 +79,7 @@ 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,
@@ -98,6 +103,7 @@ class nova::compute (
nova_config {
'DEFAULT/vnc_enabled': value => $vnc_enabled;
'DEFAULT/vncserver_proxyclient_address': value => $vncserver_proxyclient_address;
'DEFAULT/vnc_keymap': value => $vnc_keymap;
}
if $neutron_enabled != true {

View File

@@ -140,6 +140,13 @@ describe 'nova::compute' do
it { should contain_nova_config('DEFAULT/instance_usage_audit').with_value(true) }
it { should 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 { should contain_nova_config('DEFAULT/vnc_keymap').with_value('fr') }
end
end