2014-02-15 23:29:16 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module HyperV
|
2014-02-16 00:28:11 +00:00
|
|
|
autoload :Action, File.expand_path("../action", __FILE__)
|
|
|
|
autoload :Errors, File.expand_path("../errors", __FILE__)
|
|
|
|
|
2014-02-15 23:29:16 +00:00
|
|
|
class Plugin < Vagrant.plugin("2")
|
2014-02-15 23:38:11 +00:00
|
|
|
name "Hyper-V provider"
|
2014-02-15 23:29:16 +00:00
|
|
|
description <<-DESC
|
|
|
|
This plugin installs a provider that allows Vagrant to manage
|
|
|
|
machines in Hyper-V.
|
|
|
|
DESC
|
|
|
|
|
2014-02-27 07:13:34 +00:00
|
|
|
provider(:hyperv) do
|
2014-02-15 23:29:16 +00:00
|
|
|
require_relative "provider"
|
2014-02-16 00:28:11 +00:00
|
|
|
init!
|
2014-02-15 23:29:16 +00:00
|
|
|
Provider
|
|
|
|
end
|
|
|
|
|
2014-02-15 23:38:11 +00:00
|
|
|
config(:hyperv, :provider) do
|
|
|
|
require_relative "config"
|
2014-02-16 00:28:11 +00:00
|
|
|
init!
|
2014-02-15 23:38:11 +00:00
|
|
|
Config
|
2014-02-15 23:29:16 +00:00
|
|
|
end
|
2014-02-16 00:28:11 +00:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def self.init!
|
|
|
|
return if defined?(@_init)
|
|
|
|
I18n.load_path << File.expand_path(
|
|
|
|
"templates/locales/providers_hyperv.yml", Vagrant.source_root)
|
|
|
|
I18n.reload!
|
|
|
|
@_init = true
|
|
|
|
end
|
2014-02-15 23:29:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|