[DRE-commits] [vagrant-libvirt] 125/163: support keymap settings close #326
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Apr 24 13:57:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to annotated tag 0.0.26
in repository vagrant-libvirt.
commit c881f98079f00bffa0a7493095f83ff5738f1959
Author: dima <pronix.service at gmail.com>
Date: Thu Mar 26 08:07:27 2015 +0100
support keymap settings close #326
---
README.md | 3 ++-
lib/vagrant-libvirt/action/create_domain.rb | 2 ++
lib/vagrant-libvirt/config.rb | 3 +++
lib/vagrant-libvirt/templates/domain.xml.erb | 2 +-
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 9550bb3..385be25 100644
--- a/README.md
+++ b/README.md
@@ -156,6 +156,7 @@ end
* `graphics_ip` - Sets the IP for the display protocol to bind to. Defaults to "127.0.0.0.1".
* `graphics_passwd` - Sets the password for the display protocol. Working for vnc and spice. by default working without passsword.
* `video_type` - Sets the graphics card type exposed to the guest. Defaults to "cirrus". [Possible values](http://libvirt.org/formatdomain.html#elementsVideo) are "vga", "cirrus", "vmvga", "xen", "vbox", or "qxl".
+* `keymap` - Set keymap for vm. default: en-us
* `video_vram` - Used by some graphics card types to vary the amount of RAM dedicated to video. Defaults to 9216.
@@ -302,7 +303,7 @@ vagrant-libvirt supports vagrant's [standard ssh settings](https://docs.vagrantu
## Forwarded Ports
-vagrant-libvirt supports Forwarded Ports via ssh port forwarding. Please note that due to a well known limitation only the TCP protocol is supported. For each `forwarded_port` directive you specify in your Vagrantfile, vagrant-libvirt will maintain an active ssh process for the lifetime of the VM.
+vagrant-libvirt supports Forwarded Ports via ssh port forwarding. Please note that due to a well known limitation only the TCP protocol is supported. For each `forwarded_port` directive you specify in your Vagrantfile, vagrant-libvirt will maintain an active ssh process for the lifetime of the VM.
vagrant-libvirt supports an additional `forwarded_port` option
`gateway_ports` which defaults to `false`, but can be set to `true` if
diff --git a/lib/vagrant-libvirt/action/create_domain.rb b/lib/vagrant-libvirt/action/create_domain.rb
index a552f2e..9fd3802 100644
--- a/lib/vagrant-libvirt/action/create_domain.rb
+++ b/lib/vagrant-libvirt/action/create_domain.rb
@@ -46,6 +46,7 @@ module VagrantPlugins
end
@video_type = config.video_type
@video_vram = config.video_vram
+ @keymap = config.keymap
# Storage
@storage_pool_name = config.storage_pool_name
@@ -111,6 +112,7 @@ module VagrantPlugins
env[:ui].info(" -- Graphics Password: #{@graphics_passwd.empty? ? 'Not defined': 'Defined'}")
env[:ui].info(" -- Video Type: #{@video_type}")
env[:ui].info(" -- Video VRAM: #{@video_vram}")
+ env[:ui].info(" -- Keymap: #{@keymap}")
if @disks.length > 0
env[:ui].info(" -- Disks: #{_disks_print(@disks)}")
diff --git a/lib/vagrant-libvirt/config.rb b/lib/vagrant-libvirt/config.rb
index 12e049e..d84f32c 100644
--- a/lib/vagrant-libvirt/config.rb
+++ b/lib/vagrant-libvirt/config.rb
@@ -69,6 +69,7 @@ module VagrantPlugins
attr_accessor :graphics_ip
attr_accessor :video_type
attr_accessor :video_vram
+ attr_accessor :keymap
# Storage
attr_accessor :disks
@@ -105,6 +106,7 @@ module VagrantPlugins
@graphics_passwd = UNSET_VALUE
@video_type = UNSET_VALUE
@video_vram = UNSET_VALUE
+ @keymap = UNSET_VALUE
# Storage
@disks = UNSET_VALUE
@@ -237,6 +239,7 @@ module VagrantPlugins
@graphics_ip = '127.0.0.1' if @graphics_ip == UNSET_VALUE
@video_type = 'cirrus' if @video_type == UNSET_VALUE
@video_vram = 9216 if @video_vram == UNSET_VALUE
+ @keymap = 'en-us' if @keymap == UNSET_VALUE
# Storage
@disks = [] if @disks == UNSET_VALUE
diff --git a/lib/vagrant-libvirt/templates/domain.xml.erb b/lib/vagrant-libvirt/templates/domain.xml.erb
index 0ac20f1..960b357 100644
--- a/lib/vagrant-libvirt/templates/domain.xml.erb
+++ b/lib/vagrant-libvirt/templates/domain.xml.erb
@@ -52,7 +52,7 @@
</console>
<input type='mouse' bus='ps2'/>
<%# Video device -%>
- <graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='<%= @graphics_autoport %>' listen='<%= @graphics_ip %>' keymap='en-us' <%= @graphics_passwd%> />
+ <graphics type='<%= @graphics_type %>' port='<%= @graphics_port %>' autoport='<%= @graphics_autoport %>' listen='<%= @graphics_ip %>' keymap='<%= @keymap %>' <%= @graphics_passwd%> />
<video>
<model type='<%= @video_type %>' vram='<%= @video_vram %>' heads='1'/>
</video>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/vagrant-libvirt.git
More information about the Pkg-ruby-extras-commits
mailing list