lib/veewee/definition.rb in veewee-0.3.1 vs lib/veewee/definition.rb in veewee-0.3.2
- old
+ new
@@ -19,29 +19,32 @@
attr_accessor :kickstart_port,:kickstart_ip,:kickstart_timeout, :kickstart_file
attr_accessor :ssh_login_timeout, :ssh_user , :ssh_password, :ssh_key, :ssh_host_port, :ssh_guest_port
+ attr_accessor :winrm_login_timeout, :winrm_user , :winrm_password, :winrm_host_port, :winrm_guest_port
+
attr_accessor :sudo_cmd
attr_accessor :shutdown_cmd
attr_accessor :pre_postinstall_file
attr_accessor :postinstall_files, :postinstall_timeout
attr_accessor :floppy_files
- attr_accessor :use_hw_virt_ext,:use_pae,:hostiocache
+ attr_accessor :use_hw_virt_ext,:use_pae,:hostiocache, :use_sata
attr_accessor :iso_dowload_timeout, :iso_src,:iso_md5 ,:iso_download_instructions
attr_accessor :virtualbox
attr_accessor :vmfusion
attr_accessor :kvm
+ attr_accessor :add_shares
+ attr_accessor :vmdk_file
-
def ui
return @_ui if defined?(@_ui)
@_ui = @env.ui.dup
@_ui.resource = @name
@_ui
@@ -62,29 +65,36 @@
@cpu_count='1' ; @memory_size='256';
# Default there is no ISO file mounted
@iso_file = nil, @iso_src = nil ; @iso_md5 = nil ; @iso_download_timeout=1000 ; @iso_download_instructions = nil
+ # Shares to add
+ @add_shares = []
+
# Default is no floppy mounted
@floppy_files = nil
# Default there are no post install files
@pre_postinstall_file = nil
@postinstall_files=[]; @postinstall_timeout = 10000;
@iso_file=""
@disk_size = '10240'; @disk_format = 'VDI'; @disk_variant = 'Standard'
+ @use_sata = true
# :hostiocache => 'off' ,
# :os_type_id => 'Ubuntu',
# :boot_wait => "10", :boot_cmd_sequence => [ "boot"],
# :kickstart_port => "7122", :kickstart_ip => "127.0.0.1", :kickstart_timeout => 10000,#
# :ssh_login_timeout => "10000", :ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "",
@ssh_host_port = "2222"; @ssh_guest_port = "22"
# :ssh_host_port => "2222", :ssh_guest_port => "22", :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
# :shutdown_cmd => "shutdown -h now",
# :kickstart_file => nil,
+ @winrm_host_port = "5985"; @winrm_guest_port = "5985"
+ @winrm_login_timeout = "10000"
+ @boot_cmd_sequence = [] # Empty list by default
@virtualbox={:vm_options => {}}
@vmfusion={:vm_options => {}}
@kvm={:vm_options => {}}
@@ -169,10 +179,10 @@
return false
end
# Postinstall files require a valid user and password
unless self.postinstall_files.nil?
- if self.ssh_user.nil? || self.ssh_password.nil?
+ if (self.ssh_user.nil? || self.ssh_password.nil?) && (self.winrm_user.nil? || self.winrm_password.nil?)
return false
end
end
return true