Class: Packer::Builder::VMWareVMX

Inherits:
Packer::Builder show all
Defined in:
lib/packer/builders/vmware_vmx.rb

Constant Summary

Constants inherited from Packer::Builder

AMAZON_EBS, AMAZON_INSTANCE, DOCKER, NULL, QEMU, VALID_BUILDER_TYPES, VIRTUALBOX_ISO, VMWARE_ISO, VMWARE_VMX

Instance Attribute Summary

Attributes inherited from Packer::Builder

#communicators

Attributes inherited from DataObject

#data, #key_dependencies, #required

Instance Method Summary collapse

Methods inherited from Packer::Builder

#communicator, get_builder, #name, #ssh_bastion_host, #ssh_bastion_password, #ssh_bastion_private_key_file, #ssh_bastion_username, #ssh_disable_agent, #ssh_handshake_attempts, #ssh_host, #ssh_password, #ssh_port, #ssh_private_key_file, #ssh_pty, #ssh_timeout, #ssh_username, types, #winrm_host, #winrm_password, #winrm_port, #winrm_timeout, #winrm_username

Methods inherited from DataObject

#__add_array_of_array_of_strings, #__add_array_of_hashes, #__add_array_of_ints, #__add_array_of_strings, #__add_boolean, #__add_hash, #__add_integer, #__add_json, #__add_string, #__exclusive_key_error, #add_key_dependencies, #add_required, #deep_copy, #validate, #validate_key_dependencies, #validate_required

Constructor Details

#initializeVMWareVMX

Returns a new instance of VMWareVMX.



4
5
6
7
8
9
10
11
12
# File 'lib/packer/builders/vmware_vmx.rb', line 4

def initialize
  super
  data['type'] = VMWARE_VMX
  add_required(
    'source_path',
    'communicator'
  )
  self.communicators = %w(none ssh winrm)
end

Instance Method Details

#boot_command(commands) ⇒ Object



18
19
20
# File 'lib/packer/builders/vmware_vmx.rb', line 18

def boot_command(commands)
  __add_array_of_strings('boot_command', commands)
end

#boot_wait(wait) ⇒ Object



22
23
24
# File 'lib/packer/builders/vmware_vmx.rb', line 22

def boot_wait(wait)
  __add_string('boot_wait', wait)
end

#floppy_files(files) ⇒ Object



26
27
28
# File 'lib/packer/builders/vmware_vmx.rb', line 26

def floppy_files(files)
  __add_array_of_strings('floppy_files', files)
end

#fusion_app_path(app_path) ⇒ Object



30
31
32
# File 'lib/packer/builders/vmware_vmx.rb', line 30

def fusion_app_path(app_path)
  __add_string('fusion_app_path', app_path)
end

#headless(bool) ⇒ Object



34
35
36
# File 'lib/packer/builders/vmware_vmx.rb', line 34

def headless(bool)
  __add_boolean('headless', bool)
end

#http_directory(path) ⇒ Object



38
39
40
# File 'lib/packer/builders/vmware_vmx.rb', line 38

def http_directory(path)
  __add_string('http_directory', path)
end

#http_port_max(port) ⇒ Object



46
47
48
# File 'lib/packer/builders/vmware_vmx.rb', line 46

def http_port_max(port)
  __add_integer('http_port_max', port)
end

#http_port_min(port) ⇒ Object



42
43
44
# File 'lib/packer/builders/vmware_vmx.rb', line 42

def http_port_min(port)
  __add_integer('http_port_min', port)
end

#output_directory(path) ⇒ Object



50
51
52
# File 'lib/packer/builders/vmware_vmx.rb', line 50

def output_directory(path)
  __add_string('output_directory', path)
end

#shutdown_command(command) ⇒ Object



54
55
56
# File 'lib/packer/builders/vmware_vmx.rb', line 54

def shutdown_command(command)
  __add_string('shutdown_command', command)
end

#shutdown_timeout(timeout) ⇒ Object



58
59
60
# File 'lib/packer/builders/vmware_vmx.rb', line 58

def shutdown_timeout(timeout)
  __add_string('shutdown_timeout', timeout)
end

#skip_compaction(bool) ⇒ Object



62
63
64
# File 'lib/packer/builders/vmware_vmx.rb', line 62

def skip_compaction(bool)
  __add_boolean('skip_compaction', bool)
end

#source_path(path) ⇒ Object



14
15
16
# File 'lib/packer/builders/vmware_vmx.rb', line 14

def source_path(path)
  __add_string('source_path', path)
end

#vm_name(name) ⇒ Object



66
67
68
# File 'lib/packer/builders/vmware_vmx.rb', line 66

def vm_name(name)
  __add_string('vm_name', name)
end

#vmx_data(data_hash) ⇒ Object



70
71
72
# File 'lib/packer/builders/vmware_vmx.rb', line 70

def vmx_data(data_hash)
  __add_hash('vmx_data', data_hash)
end

#vmx_data_post(data_hash) ⇒ Object



74
75
76
# File 'lib/packer/builders/vmware_vmx.rb', line 74

def vmx_data_post(data_hash)
  __add_hash('vmx_data_post', data_hash)
end

#vnc_port_max(port) ⇒ Object



82
83
84
# File 'lib/packer/builders/vmware_vmx.rb', line 82

def vnc_port_max(port)
  __add_integer('vnc_port_max', port)
end

#vnc_port_min(port) ⇒ Object



78
79
80
# File 'lib/packer/builders/vmware_vmx.rb', line 78

def vnc_port_min(port)
  __add_integer('vnc_port_min', port)
end