Sha256: 28641eaa1c511d29dae906a50067eca8090b37dab36ee3d23644cd888a0fcc53

Contents?: true

Size: 1.81 KB

Versions: 10

Compression:

Stored size: 1.81 KB

Contents

module VagrantPlugins
  module HyperV
    autoload :Action, File.expand_path("../action", __FILE__)
    autoload :Errors, File.expand_path("../errors", __FILE__)

    class Plugin < Vagrant.plugin("2")
      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

      config(:hyperv, :provider) do
        require_relative "config"
        init!
        Config
      end

      provider_capability("hyperv", "public_address") do
        require_relative "cap/public_address"
        Cap::PublicAddress
      end

      provider_capability("hyperv", "snapshot_list") do
        require_relative "cap/snapshot_list"
        Cap::SnapshotList
      end

      provider_capability(:hyperv, :configure_disks) do
        require_relative "cap/configure_disks"
        Cap::ConfigureDisks
      end

      provider_capability(:hyperv, :cleanup_disks) do
        require_relative "cap/cleanup_disks"
        Cap::CleanupDisks
      end

      provider_capability(:hyperv, :validate_disk_ext) do
        require_relative "cap/validate_disk_ext"
        Cap::ValidateDiskExt
      end

      provider_capability(:hyperv, :default_disk_exts) do
        require_relative "cap/validate_disk_ext"
        Cap::ValidateDiskExt
      end

      provider_capability(:hyperv, :set_default_disk_ext) do
        require_relative "cap/validate_disk_ext"
        Cap::ValidateDiskExt
      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

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
vagrant-unbundled-2.3.6.0 plugins/providers/hyperv/plugin.rb
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/plugins/providers/hyperv/plugin.rb
vagrant-unbundled-2.3.3.0 plugins/providers/hyperv/plugin.rb
vagrant-unbundled-2.3.2.0 plugins/providers/hyperv/plugin.rb
vagrant-unbundled-2.2.19.0 plugins/providers/hyperv/plugin.rb
vagrant-unbundled-2.2.18.0 plugins/providers/hyperv/plugin.rb
vagrant-unbundled-2.2.16.0 plugins/providers/hyperv/plugin.rb
vagrant-unbundled-2.2.14.0 plugins/providers/hyperv/plugin.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/providers/hyperv/plugin.rb
vagrant-unbundled-2.2.10.0 plugins/providers/hyperv/plugin.rb