Sha256: 99826e2f6bbf9e8d8ae4a33c74d2e729c7988fbbe20a46465498b20f497fcc35

Contents?: true

Size: 1.05 KB

Versions: 23

Compression:

Stored size: 1.05 KB

Contents

require "vagrant"

module VagrantWindows
  module Config
    class Windows < Vagrant.plugin("2", :config)

      attr_accessor :halt_timeout
      attr_accessor :halt_check_interval
      attr_accessor :set_work_network
      
      def initialize
        @halt_timeout        = UNSET_VALUE
        @halt_check_interval = UNSET_VALUE
        @set_work_network    = UNSET_VALUE
      end

      def validate(machine)
        errors = []

        errors << "windows.halt_timeout cannot be nil."        if machine.config.windows.halt_timeout.nil?
        errors << "windows.halt_check_interval cannot be nil." if machine.config.windows.halt_check_interval.nil?

        errors << "windows.set_work_network cannot be nil." if machine.config.windows.set_work_network.nil?
        { "Windows Guest" => errors }
      end

      def finalize!
        @halt_timeout = 30       if @halt_timeout == UNSET_VALUE
        @halt_check_interval = 1 if @halt_check_interval == UNSET_VALUE
        @set_work_network = false if @set_work_network == UNSET_VALUE
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
vagrant-windows-1.7.0.pre.1 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.6.0 lib/vagrant-windows/config/windows.rb
vagrant-plugin-dummy-0.0.7 windows/config/windows.rb
vagrant-windows-1.6.0.pre.1 lib/vagrant-windows/config/windows.rb
vagrant-plugin-dummy-0.0.6 windows/config/windows.rb
vagrant-plugin-dummy-0.0.5 windows/config/windows.rb
vagrant-windows-1.5.1 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.5.0 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.4.0 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.3.2 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.3.1 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.3.0 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.3.0.pre.3 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.3.0.pre.2 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.3.0.pre.1 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.2.3 lib/vagrant-windows/config/windows.rb
vagrant-windows-1.2.2 lib/vagrant-windows/config/windows.rb
vagrant-plugin-dummy-0.0.4 windows/config/windows.rb
vagrant-plugin-dummy-0.0.3 windows/config/windows.rb
vagrant-windows-1.2.1 lib/vagrant-windows/config/windows.rb