[DRE-commits] [vagrant-libvirt] 102/104: close #76 correct uri for different virtualizations
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Apr 24 13:55:52 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to annotated tag 0.0.11
in repository vagrant-libvirt.
commit d03f50b61899cc1592c9a6a9267d8dd39050b596
Author: dima <pronix.service at gmail.com>
Date: Sat Oct 19 23:38:15 2013 +0200
close #76 correct uri for different virtualizations
---
lib/vagrant-libvirt/action/connect_libvirt.rb | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/vagrant-libvirt/action/connect_libvirt.rb b/lib/vagrant-libvirt/action/connect_libvirt.rb
index cf2d6cf..1f089de 100644
--- a/lib/vagrant-libvirt/action/connect_libvirt.rb
+++ b/lib/vagrant-libvirt/action/connect_libvirt.rb
@@ -24,6 +24,17 @@ module VagrantPlugins
# Setup connection uri.
uri = config.driver
+ virt_path = case uri
+ when 'qemu', 'openvz', 'uml', 'phyp', 'parallels'
+ '/system'
+ when 'xen', 'esx'
+ '/'
+ when 'vbox', 'vmwarews', 'hyperv'
+ '/session'
+ else
+ raise "Require specify driver #{uri}"
+ end
+
if config.connect_via_ssh
uri << '+ssh://'
if config.username
@@ -40,7 +51,8 @@ module VagrantPlugins
uri << config.host if config.host
end
- uri << '/system?no_verify=1'
+ uri << virt_path
+ uri << '?no_verify=1'
# set ssh key for access to libvirt host
home_dir = `echo ${HOME}`.chomp
uri << "&keyfile=#{home_dir}/.ssh/id_rsa"
--
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