vagrant-lxc-ng/lib/vagrant-lxc/plugin.rb
Fabio Rehm b7dbfc84af Merge branch 'master' of github.com:jefmathiot/vagrant-lxc
Conflicts:
	lib/vagrant-lxc/plugin.rb
2014-03-21 19:38:35 -03:00

49 lines
1.2 KiB
Ruby

require 'vagrant'
require 'vagrant-backports/utils'
module Vagrant
module LXC
class Plugin < Vagrant.plugin("2")
name "vagrant-lxc"
description <<-EOF
The LXC provider allows Vagrant to manage and control
LXC-based virtual machines.
EOF
extra = []
extra << {parallel: true} if Vagrant::Backports.vagrant_1_2_or_later?
provider(:lxc, *extra) do
require File.expand_path("../provider", __FILE__)
I18n.load_path << File.expand_path(File.dirname(__FILE__) + '/../../locales/en.yml')
I18n.reload!
Provider
end
command "lxc" do
require_relative 'command/root'
Command::Root
end
config(:lxc, :provider) do
require File.expand_path("../config", __FILE__)
Config
end
if Vagrant::Backports.vagrant_1_4_or_later?
synced_folder(:lxc) do
require File.expand_path("../synced_folder", __FILE__)
SyncedFolder
end
end
if Vagrant::Backports.vagrant_1_5_or_later?
provider_capability("lxc", "public_address") do
require_relative "provider/cap/public_address"
Provider::Cap::PublicAddress
end
end
end
end
end