[DRE-commits] [vagrant-libvirt] 22/77: Added an option to set the path to the libvirt socket

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Apr 24 13:56:34 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to annotated tag 0.0.17
in repository vagrant-libvirt.

commit 97140039bd9ea28855d74d922a185908281998f7
Author: Matthieu Coudron <mattator at gmail.com>
Date:   Tue Mar 11 14:47:36 2014 +0100

    Added an option to set the path to the libvirt socket
---
 README.md                                     | 1 +
 lib/vagrant-libvirt/action/connect_libvirt.rb | 2 ++
 lib/vagrant-libvirt/config.rb                 | 3 +++
 3 files changed, 6 insertions(+)

diff --git a/README.md b/README.md
index 2e5b338..a45e6bb 100644
--- a/README.md
+++ b/README.md
@@ -98,6 +98,7 @@ This provider exposes quite a few provider-specific configuration options:
 * `username` - Username and password to access Libvirt.
 * `password` - Password to access Libvirt.
 * `id_ssh_key_file` - The id ssh key file name to access Libvirt (eg: id_dsa or id_rsa or ... in the user .ssh directory)
+* `socket` - Path to the libvirt unix socket (eg: /var/run/libvirt/libvirt-sock)
 * `storage_pool_name` - Libvirt storage pool name, where box image and instance snapshots will be stored.
 
 ### Domain Specific Options
diff --git a/lib/vagrant-libvirt/action/connect_libvirt.rb b/lib/vagrant-libvirt/action/connect_libvirt.rb
index eae5917..5488e2c 100644
--- a/lib/vagrant-libvirt/action/connect_libvirt.rb
+++ b/lib/vagrant-libvirt/action/connect_libvirt.rb
@@ -59,6 +59,8 @@ module VagrantPlugins
             home_dir = `echo ${HOME}`.chomp
             uri << "\&keyfile=#{home_dir}/.ssh/"+config.id_ssh_key_file
           end
+          # set path to libvirt socket
+          uri << "\&socket="+config.socket if config.socket
 
           conn_attr = {}
           conn_attr[:provider] = 'libvirt'
diff --git a/lib/vagrant-libvirt/config.rb b/lib/vagrant-libvirt/config.rb
index ec59f05..5ba127e 100644
--- a/lib/vagrant-libvirt/config.rb
+++ b/lib/vagrant-libvirt/config.rb
@@ -12,6 +12,9 @@ module VagrantPlugins
       # If use ssh tunnel to connect to Libvirt.
       attr_accessor :connect_via_ssh
 
+      # Path towards the libvirt socket
+      attr_accessor :socket
+
       # The username to access Libvirt.
       attr_accessor :username
 

-- 
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