Class: Packer::Builder::VirtualBoxISO
Constant Summary
AMAZON_EBS, AMAZON_INSTANCE, DOCKER, VALID_BUILDER_TYPES, VIRTUALBOX_ISO
Instance Attribute Summary
Attributes inherited from DataObject
#data, #required
Instance Method Summary
collapse
get_builder, #name, types
Methods inherited from DataObject
#__add_array_of_array_of_strings, #__add_array_of_hashes, #__add_array_of_strings, #__add_boolean, #__add_hash, #__add_integer, #__add_string, #__exclusive_key_error, #add_required, #deep_copy, #validate
Constructor Details
Returns a new instance of VirtualBoxISO.
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/packer/builders/virtualbox.rb', line 21
def initialize
super
self.data['type'] = VIRTUALBOX_ISO
self.add_required(
'iso_checksum',
'iso_checksum_type',
'iso_url',
'ssh_username'
)
end
|
Instance Method Details
#boot_command(commands) ⇒ Object
52
53
54
|
# File 'lib/packer/builders/virtualbox.rb', line 52
def boot_command(commands)
self.__add_array_of_strings('boot_command', commands)
end
|
#boot_wait(time) ⇒ Object
56
57
58
|
# File 'lib/packer/builders/virtualbox.rb', line 56
def boot_wait(time)
self.__add_string('boot_wait',time)
end
|
#disk_size(megabytes) ⇒ Object
60
61
62
|
# File 'lib/packer/builders/virtualbox.rb', line 60
def disk_size(megabytes)
self.__add_integer('disk_size', megabytes)
end
|
#export_opts(vboxmanage_export_options) ⇒ Object
64
65
66
|
# File 'lib/packer/builders/virtualbox.rb', line 64
def export_opts(vboxmanage_export_options)
self.__add_array_of_strings('export_opts', vboxmanage_export_options)
end
|
#floppy_files(files) ⇒ Object
68
69
70
|
# File 'lib/packer/builders/virtualbox.rb', line 68
def floppy_files(files)
self.__add_array_of_strings('floppy_files', files)
end
|
72
73
74
|
# File 'lib/packer/builders/virtualbox.rb', line 72
def format(format)
self.__add_string('format', format)
end
|
#guest_additions_mode(mode) ⇒ Object
76
77
78
|
# File 'lib/packer/builders/virtualbox.rb', line 76
def guest_additions_mode(mode)
self.__add_string('guest_additions_mode', mode)
end
|
#guest_additions_path(path) ⇒ Object
80
81
82
|
# File 'lib/packer/builders/virtualbox.rb', line 80
def guest_additions_path(path)
self.__add_string('guest_additions_path', path)
end
|
#guest_additions_sha256(checksum) ⇒ Object
84
85
86
|
# File 'lib/packer/builders/virtualbox.rb', line 84
def guest_additions_sha256(checksum)
self.__add_string('guest_additions_sha256', checksum)
end
|
#guest_additions_url(url) ⇒ Object
88
89
90
|
# File 'lib/packer/builders/virtualbox.rb', line 88
def guest_additions_url(url)
self.__add_string('guest_additions_url', url)
end
|
#guest_os_type(ostype) ⇒ Object
92
93
94
|
# File 'lib/packer/builders/virtualbox.rb', line 92
def guest_os_type(ostype)
self.__add_string('guest_os_type', ostype)
end
|
#hard_drive_interface(controllertype) ⇒ Object
96
97
98
|
# File 'lib/packer/builders/virtualbox.rb', line 96
def hard_drive_interface(controllertype)
self.__add_string('hard_drive_interface', controllertype)
end
|
#headless(bool) ⇒ Object
100
101
102
|
# File 'lib/packer/builders/virtualbox.rb', line 100
def headless(bool)
self.__add_boolean('headless', bool)
end
|
#http_directory(directory) ⇒ Object
104
105
106
|
# File 'lib/packer/builders/virtualbox.rb', line 104
def http_directory(directory)
self.__add_string('http_directory', directory)
end
|
#http_port_max(port_number) ⇒ Object
112
113
114
|
# File 'lib/packer/builders/virtualbox.rb', line 112
def http_port_max(port_number)
self.__add_integer('http_port_max', port_number)
end
|
#http_port_min(port_number) ⇒ Object
108
109
110
|
# File 'lib/packer/builders/virtualbox.rb', line 108
def http_port_min(port_number)
self.__add_integer('http_port_min', port_number)
end
|
#iso_checksum(checksum) ⇒ Object
32
33
34
|
# File 'lib/packer/builders/virtualbox.rb', line 32
def iso_checksum(checksum)
self.__add_string('iso_checksum', checksum)
end
|
#iso_checksum_type(type) ⇒ Object
36
37
38
|
# File 'lib/packer/builders/virtualbox.rb', line 36
def iso_checksum_type(type)
self.__add_string('iso_checksum_type', type)
end
|
#iso_url(url) ⇒ Object
40
41
42
|
# File 'lib/packer/builders/virtualbox.rb', line 40
def iso_url(url)
self.__add_string('iso_url', url, %w[iso_urls])
end
|
#iso_urls(urls) ⇒ Object
44
45
46
|
# File 'lib/packer/builders/virtualbox.rb', line 44
def iso_urls(urls)
self.__add_array_of_strings('iso_urls', urls, %[iso_url])
end
|
#output_directory(directory) ⇒ Object
116
117
118
|
# File 'lib/packer/builders/virtualbox.rb', line 116
def output_directory(directory)
self.__add_string('output_directory', directory)
end
|
#shutdown_command(command) ⇒ Object
120
121
122
|
# File 'lib/packer/builders/virtualbox.rb', line 120
def shutdown_command(command)
self.__add_string('shutdown_command', command)
end
|
#shutdown_timeout(time) ⇒ Object
124
125
126
|
# File 'lib/packer/builders/virtualbox.rb', line 124
def shutdown_timeout(time)
self.__add_string('shutdown_timeout', time)
end
|
#ssh_host_port_max(port_number) ⇒ Object
132
133
134
|
# File 'lib/packer/builders/virtualbox.rb', line 132
def ssh_host_port_max(port_number)
self.__add_integer('ssh_host_port_max', port_number)
end
|
#ssh_host_port_min(port_number) ⇒ Object
128
129
130
|
# File 'lib/packer/builders/virtualbox.rb', line 128
def ssh_host_port_min(port_number)
self.__add_integer('ssh_host_port_min', port_number)
end
|
#ssh_key_path(path) ⇒ Object
136
137
138
|
# File 'lib/packer/builders/virtualbox.rb', line 136
def ssh_key_path(path)
self.__add_string('ssh_key_path', path)
end
|
#ssh_password(password) ⇒ Object
140
141
142
|
# File 'lib/packer/builders/virtualbox.rb', line 140
def ssh_password(password)
self.__add_string('ssh_password', password)
end
|
#ssh_port(port_number) ⇒ Object
144
145
146
|
# File 'lib/packer/builders/virtualbox.rb', line 144
def ssh_port(port_number)
self.__add_integer('ssh_port', port_number)
end
|
#ssh_username(username) ⇒ Object
48
49
50
|
# File 'lib/packer/builders/virtualbox.rb', line 48
def ssh_username(username)
self.__add_string('ssh_username', username)
end
|
#ssh_wait_timeout(time) ⇒ Object
148
149
150
|
# File 'lib/packer/builders/virtualbox.rb', line 148
def ssh_wait_timeout(time)
self.__add_string('ssh_wait_timeout', time)
end
|
#vboxmanage(array_of_commands) ⇒ Object
152
153
154
|
# File 'lib/packer/builders/virtualbox.rb', line 152
def vboxmanage(array_of_commands)
self.__add_array_of_array_of_strings('vboxmanage', array_of_commands)
end
|
#vboxmanage_post(array_of_commands) ⇒ Object
156
157
158
|
# File 'lib/packer/builders/virtualbox.rb', line 156
def vboxmanage_post(array_of_commands)
self.__add_array_of_array_of_strings('vboxmanage_post', array_of_commands)
end
|
#virtualbox_version_file(file) ⇒ Object
160
161
162
|
# File 'lib/packer/builders/virtualbox.rb', line 160
def virtualbox_version_file(file)
self.__add_string('virtualbox_version_file', file)
end
|
#vm_name(name) ⇒ Object
164
165
166
|
# File 'lib/packer/builders/virtualbox.rb', line 164
def vm_name(name)
self.__add_string('vm_name', name)
end
|