Sha256: 4f84d9b2485522e30a784b84f1e2c04d2039d2a3785fac78f76791a690fa17ed

Contents?: true

Size: 1001 Bytes

Versions: 1

Compression:

Stored size: 1001 Bytes

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 @halt_timeout.nil?
        errors << "windows.halt_check_interval cannot be nil." if @halt_check_interval.nil?
        errors << "windows.set_work_network cannot be nil." if @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

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-windows-1.7.0.pre.2 lib/vagrant-windows/config/windows.rb