vagrant/plugins/providers/hyperv/plugin.rb

42 lines
995 B
Ruby
Raw Normal View History

module VagrantPlugins
module HyperV
autoload :Action, File.expand_path("../action", __FILE__)
autoload :Errors, File.expand_path("../errors", __FILE__)
class Plugin < Vagrant.plugin("2")
2014-02-15 23:38:11 +00:00
name "Hyper-V provider"
description <<-DESC
This plugin installs a provider that allows Vagrant to manage
machines in Hyper-V.
DESC
provider(:hyperv, priority: 4) do
require_relative "provider"
init!
Provider
end
2014-02-15 23:38:11 +00:00
config(:hyperv, :provider) do
require_relative "config"
init!
2014-02-15 23:38:11 +00:00
Config
end
2014-03-06 19:01:19 +00:00
provider_capability("hyperv", "public_address") do
require_relative "cap/public_address"
Cap::PublicAddress
end
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
end
end
end