Class: VBox::VirtualBox

Inherits:
Base
  • Object
show all
Defined in:
lib/virtualbox/classes/virtual_box.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#_this, #delete!, #ensure_hash, #initialize, #vbox_class

Constructor Details

This class inherits a constructor from VBox::Base

Instance Attribute Details

#refObject (readonly)

Returns the value of attribute ref.



4
5
6
# File 'lib/virtualbox/classes/virtual_box.rb', line 4

def ref
  @ref
end

Instance Method Details

#api_versionObject



24
25
26
# File 'lib/virtualbox/classes/virtual_box.rb', line 24

def api_version
  VBox::WebService.send_request(:i_virtual_box_get_api_version, _this)
end

#check_firmware_present(args = {}) ⇒ Object

Methods



123
124
125
126
# File 'lib/virtualbox/classes/virtual_box.rb', line 123

def check_firmware_present(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_virtual_box_check_firmware_present, _this.merge(args))
end

#compose_machine_filename(args = {}) ⇒ Object



128
129
130
131
# File 'lib/virtualbox/classes/virtual_box.rb', line 128

def compose_machine_filename(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_virtual_box_compose_machine_filename, _this.merge(args))
end

#create_applianceObject



133
134
135
136
# File 'lib/virtualbox/classes/virtual_box.rb', line 133

def create_appliance
  appliance = VBox::WebService.send_request(:i_virtual_box_create_appliance, _this)
  VBox::Appliance.new(appliance)
end

#create_dhcp_server(args = {}) ⇒ Object



138
139
140
141
142
# File 'lib/virtualbox/classes/virtual_box.rb', line 138

def create_dhcp_server(args={})
  ensure_hash(args)
  dhcp_server = VBox::WebService.send_request(:i_virtual_box_create_dhcp_server, _this.merge(args))
  VBox::DHCPServer.new(dhcp_server)
end

#create_hard_disk(args = {}) ⇒ Object



144
145
146
147
148
# File 'lib/virtualbox/classes/virtual_box.rb', line 144

def create_hard_disk(args={})
  ensure_hash(args)
  hard_disk = VBox::WebService.send_request(:i_virtual_box_create_hard_disk, _this.merge(args))
  VBox::Medium.new(hard_disk)
end

#create_machine(args = {}) ⇒ Object



150
151
152
153
154
# File 'lib/virtualbox/classes/virtual_box.rb', line 150

def create_machine(args={})
  ensure_hash(args)
  machine = VBox::WebService.send_request(:i_virtual_box_create_machine, _this.merge(args))
  VBox::Machine.new(machine)
end

#create_shared_folder(args = {}) ⇒ Object



156
157
158
159
# File 'lib/virtualbox/classes/virtual_box.rb', line 156

def create_shared_folder(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_virtual_box_create_shared_folder, _this.merge(args))
end

#dhcp_serversObject



101
102
103
104
105
106
# File 'lib/virtualbox/classes/virtual_box.rb', line 101

def dhcp_servers
  dhcp_servers = VBox::WebService.send_request(:i_virtual_box_get_dhcp_server, _this)
  dhcp_servers.to_a.map do |dhcp_server|
    VBox::DHCPServer.new(dhcp_server)
  end
end

#dvd_imagesObject



64
65
66
67
68
69
# File 'lib/virtualbox/classes/virtual_box.rb', line 64

def dvd_images
  dvd_images = VBox::WebService.send_request(:i_virtual_box_get_dvd_images, _this)
  dvd_images.to_a.map do |dvd_image|
    VBox::Medium.new(dvd_image)
  end
end

#event_sourceObject



108
109
110
111
# File 'lib/virtualbox/classes/virtual_box.rb', line 108

def event_source
  event_source = VBox::WebService.send_request(:i_virtual_box_get_event_source, _this)
  VBox::EventSource.new(event_source)
end

#find_dhcp_server_by_network_name(args = {}) ⇒ Object



161
162
163
164
165
# File 'lib/virtualbox/classes/virtual_box.rb', line 161

def find_dhcp_server_by_network_name(args={})
  ensure_hash(args)
  dhcp_server = VBox::WebService.send_request(:i_virtual_box_find_dhcp_server_by_network_name, _this.merge(args))
  VBox::DHCPServer.new(dhcp_server)
end

#find_machine(args = {}) ⇒ Object



167
168
169
170
171
# File 'lib/virtualbox/classes/virtual_box.rb', line 167

def find_machine(args={})
  ensure_hash(args)
  machine = VBox::WebService.send_request(:i_virtual_box_find_machine, _this.merge(args))
  VBox::Machine.new(machine)
end

#floppy_imagesObject



71
72
73
74
75
76
# File 'lib/virtualbox/classes/virtual_box.rb', line 71

def floppy_images
  floppy_images = VBox::WebService.send_request(:i_virtual_box_get_floppy_images, _this)
  floppy_images.to_a.map do |floppy_image|
    VBox::Medium.new(floppy_image)
  end
end

#generic_network_driversObject



117
118
119
# File 'lib/virtualbox/classes/virtual_box.rb', line 117

def generic_network_drivers
  VBox::WebService.send_request(:i_virtual_box_get_generic_network_drivers, _this)
end

#get_extra_data(args = {}) ⇒ Object



173
174
175
176
# File 'lib/virtualbox/classes/virtual_box.rb', line 173

def get_extra_data(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_virtual_box_get_extra_data, _this.merge(args))
end

#get_extra_data_keysObject



178
179
180
# File 'lib/virtualbox/classes/virtual_box.rb', line 178

def get_extra_data_keys
  VBox::WebService.send_request(:i_virtual_box_get_extra_data_keys, _this)
end

#get_guest_os_type(args = {}) ⇒ Object



182
183
184
185
# File 'lib/virtualbox/classes/virtual_box.rb', line 182

def get_guest_os_type(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_virtual_box_get_guest_os_type, _this.merge(args))
end

#get_machine_states(args = {}) ⇒ Object



187
188
189
190
191
192
193
194
195
# File 'lib/virtualbox/classes/virtual_box.rb', line 187

def get_machine_states(args={})
  ensure_hash(args)
  if args.has_key?(:machines)
    args[:machines].map! do |machine|
      machine.ref
    end
  end
  VBox::WebService.send_request(:i_virtual_box_get_machine_states, _this.merge(args))
end

#get_machines_by_groups(args = {}) ⇒ Object



197
198
199
200
201
202
203
# File 'lib/virtualbox/classes/virtual_box.rb', line 197

def get_machines_by_groups(args={})
  ensure_hash(args)
  machines = VBox::WebService.send_request(:i_virtual_box_get_machines_by_groups, _this.merge(args))
  machines.to_a.map do |machine|
    VBox::Machine.new(machine)
  end
end

#guest_os_typesObject



85
86
87
# File 'lib/virtualbox/classes/virtual_box.rb', line 85

def guest_os_types
  VBox::WebService.send_request(:i_virtual_box_get_guest_os_types, _this)
end

#hard_disksObject



57
58
59
60
61
62
# File 'lib/virtualbox/classes/virtual_box.rb', line 57

def hard_disks
  hard_disks = VBox::WebService.send_request(:i_virtual_box_get_hard_disks, _this)
  hard_disks.to_a.map do |hard_disk|
    VBox::Medium.new(hard_disk)
  end
end

#home_folderObject



28
29
30
# File 'lib/virtualbox/classes/virtual_box.rb', line 28

def home_folder
  VBox::WebService.send_request(:i_virtual_box_get_home_folder, _this)
end

#hostObject



36
37
38
39
# File 'lib/virtualbox/classes/virtual_box.rb', line 36

def host
  host = VBox::WebService.send_request(:i_virtual_box_get_host, _this)
  VBox::Host.new(host)
end

#internal_networksObject



113
114
115
# File 'lib/virtualbox/classes/virtual_box.rb', line 113

def internal_networks
  VBox::WebService.send_request(:i_virtual_box_get_internal_networks, _this)
end

#machine_groupsObject



53
54
55
# File 'lib/virtualbox/classes/virtual_box.rb', line 53

def machine_groups
  VBox::WebService.send_request(:i_virtual_box_get_machine_groups, _this)
end

#machinesObject



46
47
48
49
50
51
# File 'lib/virtualbox/classes/virtual_box.rb', line 46

def machines
  machines = VBox::WebService.send_request(:i_virtual_box_get_machines, _this)
  machines.to_a.map do |machine|
    VBox::Machine.new(machine)
  end
end

#open_machine(args = {}) ⇒ Object



205
206
207
208
209
# File 'lib/virtualbox/classes/virtual_box.rb', line 205

def open_machine(args={})
  ensure_hash(args)
  machine = VBox::WebService.send_request(:i_virtual_box_open_machine, _this.merge(args))
  VBox::Machine.new(machine)
end

#open_mediumObject



211
212
213
214
# File 'lib/virtualbox/classes/virtual_box.rb', line 211

def open_medium
  medium = VBox::WebService.send_request(:i_virtual_box_open_medium, _this.merge(args))
  VBox::Medium.new(medium)
end

#package_typeObject



20
21
22
# File 'lib/virtualbox/classes/virtual_box.rb', line 20

def package_type
  VBox::WebService.send_request(:i_virtual_box_get_package_type, _this)
end

#performance_collectorObject



96
97
98
99
# File 'lib/virtualbox/classes/virtual_box.rb', line 96

def performance_collector
  performance_collector = VBox::WebService.send_request(:i_virtual_box_get_performance_collector, _this)
  VBox::PerformanceCollector.new(performance_collector)
end

#progress_operationsObject



78
79
80
81
82
83
# File 'lib/virtualbox/classes/virtual_box.rb', line 78

def progress_operations
  progress_operations = VBox::WebService.send_request(:i_virtual_box_get_progress_operations, _this)
  progress_operations.to_a.map do |progress_operation|
    VBox::Progress.new(progress_operation)
  end
end

#register_machine(args = {}) ⇒ Object



216
217
218
219
220
# File 'lib/virtualbox/classes/virtual_box.rb', line 216

def register_machine(args={})
  ensure_hash(args)
  args[:machine] = args[:machine].ref
  VBox::WebService.send_request(:i_virtual_box_register_machine, _this.merge(args))
end

#remove_dhcp_server(args = {}) ⇒ Object



222
223
224
225
# File 'lib/virtualbox/classes/virtual_box.rb', line 222

def remove_dhcp_server(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_virtual_box_remove_dhcp_server, _this.merge(args))
end

#remove_shared_folder(args = {}) ⇒ Object



227
228
229
230
# File 'lib/virtualbox/classes/virtual_box.rb', line 227

def remove_shared_folder(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_virtual_box_remove_shared_folder, _this.merge(args))
end

#revisionObject



16
17
18
# File 'lib/virtualbox/classes/virtual_box.rb', line 16

def revision
  VBox::WebService.send_request(:i_virtual_box_get_revision, _this)
end

#set_extra_data(args = {}) ⇒ Object



232
233
234
235
# File 'lib/virtualbox/classes/virtual_box.rb', line 232

def set_extra_data(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_virtual_box_set_extra_data, _this.merge(args))
end

#set_settings_secret(args = {}) ⇒ Object



237
238
239
240
# File 'lib/virtualbox/classes/virtual_box.rb', line 237

def set_settings_secret(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_virtual_box_set_settings_secret, _this.merge(args))
end

#settings_file_pathObject



32
33
34
# File 'lib/virtualbox/classes/virtual_box.rb', line 32

def settings_file_path
  VBox::WebService.send_request(:i_virtual_box_get_settings_file_path, _this)
end

#shared_foldersObject



89
90
91
92
93
94
# File 'lib/virtualbox/classes/virtual_box.rb', line 89

def shared_folders
  shared_folders = VBox::WebService.send_request(:i_virtual_box_get_shared_folders, _this)
  shared_folders.to_a.map do |shared_folder|
    VBox::SharedFolder.new(shared_folder)
  end
end

#system_propertiesObject



41
42
43
44
# File 'lib/virtualbox/classes/virtual_box.rb', line 41

def system_properties
  system_properties = VBox::WebService.send_request(:i_virtual_box_get_system_properties, _this)
  VBox::SystemProperties.new(system_properties)
end

#versionObject

Attributes



8
9
10
# File 'lib/virtualbox/classes/virtual_box.rb', line 8

def version
  VBox::WebService.send_request(:i_virtual_box_get_version, _this)
end

#version_normalizedObject



12
13
14
# File 'lib/virtualbox/classes/virtual_box.rb', line 12

def version_normalized
  VBox::WebService.send_request(:i_virtual_box_get_version_normalized, _this)
end