mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
This monkey-patching of Vagrant::Environment#default_provider breaks with Vagrant 1.7.0, since the method's signature changed. In any case Vagrant should do the right thing without "help" from vagrant-libvirt.
30 lines
877 B
Ruby
30 lines
877 B
Ruby
require 'pathname'
|
|
require 'vagrant-libvirt/plugin'
|
|
|
|
module VagrantPlugins
|
|
module ProviderLibvirt
|
|
lib_path = Pathname.new(File.expand_path('../vagrant-libvirt', __FILE__))
|
|
autoload :Action, lib_path.join('action')
|
|
autoload :Errors, lib_path.join('errors')
|
|
autoload :Util, lib_path.join('util')
|
|
|
|
# Hold connection handler so there is no need to connect more times than
|
|
# one. This can be annoying when there are more machines to create, or when
|
|
# doing state action first and then some other.
|
|
#
|
|
# TODO Don't sure if this is the best solution
|
|
@@libvirt_connection = nil
|
|
def self.libvirt_connection
|
|
@@libvirt_connection
|
|
end
|
|
|
|
def self.libvirt_connection=(conn)
|
|
@@libvirt_connection = conn
|
|
end
|
|
|
|
def self.source_root
|
|
@source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
|
|
end
|
|
end
|
|
end
|