Sha256: 5979f402d61b0e1e83775f5a058467dab02057e785991104bd431e0c0b39e4f6

Contents?: true

Size: 948 Bytes

Versions: 10

Compression:

Stored size: 948 Bytes

Contents

require "log4r"

module VagrantPlugins
  module ProviderVirtualBox
    module Cap
      module ValidateDiskExt
        LOGGER = Log4r::Logger.new("vagrant::plugins::virtualbox::validate_disk_ext")

        # The default set of disk formats that VirtualBox supports
        DEFAULT_DISK_EXT_LIST = ["vdi", "vmdk", "vhd"].map(&:freeze).freeze
        DEFAULT_DISK_EXT = "vdi".freeze

        # @param [Vagrant::Machine] machine
        # @param [String] disk_ext
        # @return [Bool]
        def self.validate_disk_ext(machine, disk_ext)
          DEFAULT_DISK_EXT_LIST.include?(disk_ext)
        end

        # @param [Vagrant::Machine] machine
        # @return [Array]
        def self.default_disk_exts(machine)
          DEFAULT_DISK_EXT_LIST
        end

        # @param [Vagrant::Machine] machine
        # @return [String]
        def self.set_default_disk_ext(machine)
          DEFAULT_DISK_EXT
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

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