virtualbox-ws 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +2 -0
- data/LICENSE.md +5 -0
- data/README.md +57 -22
- data/lib/core_ext/string.rb +5 -0
- data/lib/virtualbox-ws.rb +2 -6
- data/lib/virtualbox/base.rb +31 -0
- data/lib/virtualbox/classes/additions_facility.rb +28 -0
- data/lib/virtualbox/classes/appliance.rb +51 -0
- data/lib/virtualbox/classes/audio_adapter.rb +33 -0
- data/lib/virtualbox/classes/bandwidth_control.rb +36 -0
- data/lib/virtualbox/classes/bandwidth_group.rb +29 -0
- data/lib/virtualbox/classes/bios_settings.rb +81 -0
- data/lib/virtualbox/classes/console.rb +201 -0
- data/lib/virtualbox/classes/dhcp_server.rb +52 -0
- data/lib/virtualbox/classes/directory.rb +27 -0
- data/lib/virtualbox/classes/display.rb +47 -0
- data/lib/virtualbox/classes/event.rb +32 -0
- data/lib/virtualbox/classes/event_listener.rb +14 -0
- data/lib/virtualbox/classes/event_source.rb +62 -0
- data/lib/virtualbox/classes/events/additions_state_changed_event.rb +7 -0
- data/lib/virtualbox/classes/events/bandwidth_group_changed_event.rb +13 -0
- data/lib/virtualbox/classes/events/can_show_window_event.rb +7 -0
- data/lib/virtualbox/classes/events/clipboard_mode_changed_event.rb +12 -0
- data/lib/virtualbox/classes/events/cpu_changed_event.rb +16 -0
- data/lib/virtualbox/classes/events/cpu_execution_cap_changed_event.rb +12 -0
- data/lib/virtualbox/classes/events/drag_and_drop_mode_changed_event.rb +12 -0
- data/lib/virtualbox/classes/events/event_source_changed_event.rb +17 -0
- data/lib/virtualbox/classes/events/extra_data_can_change_event.rb +20 -0
- data/lib/virtualbox/classes/events/extra_data_changed_event.rb +20 -0
- data/lib/virtualbox/classes/events/guest_keyboard_event.rb +12 -0
- data/lib/virtualbox/classes/events/guest_monitor_changed_event.rb +32 -0
- data/lib/virtualbox/classes/events/guest_mouse_event.rb +32 -0
- data/lib/virtualbox/classes/events/guest_property_changed_event.rb +20 -0
- data/lib/virtualbox/classes/events/host_pci_device_plug_event.rb +24 -0
- data/lib/virtualbox/classes/events/keyboard_leds_changed_event.rb +20 -0
- data/lib/virtualbox/classes/events/machine_data_changed_event.rb +12 -0
- data/lib/virtualbox/classes/events/machine_event.rb +12 -0
- data/lib/virtualbox/classes/events/machine_registered_event.rb +12 -0
- data/lib/virtualbox/classes/events/machine_state_changed_event.rb +12 -0
- data/lib/virtualbox/classes/events/medium_changed_event.rb +13 -0
- data/lib/virtualbox/classes/events/medium_registered_event.rb +20 -0
- data/lib/virtualbox/classes/events/mouse_capability_changed_event.rb +20 -0
- data/lib/virtualbox/classes/events/mouse_pointer_shape_changed_event.rb +36 -0
- data/lib/virtualbox/classes/events/nat_redirect_event.rb +40 -0
- data/lib/virtualbox/classes/events/network_adapter_changed_event.rb +13 -0
- data/lib/virtualbox/classes/events/parallel_port_changed_event.rb +13 -0
- data/lib/virtualbox/classes/events/reusable_event.rb +18 -0
- data/lib/virtualbox/classes/events/runtime_error_event.rb +20 -0
- data/lib/virtualbox/classes/events/serial_port_changed_event.rb +13 -0
- data/lib/virtualbox/classes/events/session_state_changed_event.rb +12 -0
- data/lib/virtualbox/classes/events/shared_folder_changed_event.rb +12 -0
- data/lib/virtualbox/classes/events/show_window_event.rb +12 -0
- data/lib/virtualbox/classes/events/snapshot_changed_event.rb +7 -0
- data/lib/virtualbox/classes/events/snapshot_deleted_event.rb +7 -0
- data/lib/virtualbox/classes/events/snapshot_event.rb +12 -0
- data/lib/virtualbox/classes/events/snapshot_taken_event.rb +7 -0
- data/lib/virtualbox/classes/events/state_changed_event.rb +12 -0
- data/lib/virtualbox/classes/events/storage_controller_changed_event.rb +7 -0
- data/lib/virtualbox/classes/events/storage_device_changed_event.rb +16 -0
- data/lib/virtualbox/classes/events/usb_controller_changed_event.rb +7 -0
- data/lib/virtualbox/classes/events/usb_device_state_changed_event.rb +17 -0
- data/lib/virtualbox/classes/events/v_box_svc_availability_chaged_event.rb +12 -0
- data/lib/virtualbox/classes/events/veto_event.rb +21 -0
- data/lib/virtualbox/classes/events/vrde_server_changed_event.rb +7 -0
- data/lib/virtualbox/classes/events/vrde_server_info_changed_event.rb +7 -0
- data/lib/virtualbox/classes/file.rb +73 -0
- data/lib/virtualbox/classes/fs_obj_info.rb +84 -0
- data/lib/virtualbox/classes/guest.rb +134 -0
- data/lib/virtualbox/classes/guest_directory.rb +7 -0
- data/lib/virtualbox/classes/guest_file.rb +7 -0
- data/lib/virtualbox/classes/guest_fs_obj_info.rb +7 -0
- data/lib/virtualbox/classes/guest_process.rb +7 -0
- data/lib/virtualbox/classes/guest_session.rb +232 -0
- data/lib/virtualbox/classes/host.rb +172 -0
- data/lib/virtualbox/classes/host_network_interface.rb +78 -0
- data/lib/virtualbox/classes/host_usb_device.rb +12 -0
- data/lib/virtualbox/classes/host_usb_device_filter.rb +16 -0
- data/lib/virtualbox/classes/keyboard.rb +29 -0
- data/lib/virtualbox/classes/machine.rb +922 -0
- data/lib/virtualbox/classes/managed_object_ref.rb +15 -0
- data/lib/virtualbox/classes/medium.rb +224 -0
- data/lib/virtualbox/classes/medium_format.rb +30 -0
- data/lib/virtualbox/classes/mouse.rb +37 -0
- data/lib/virtualbox/classes/nat_engine.rb +107 -0
- data/lib/virtualbox/classes/network_adapter.rb +171 -0
- data/lib/virtualbox/classes/parallel_port.rb +44 -0
- data/lib/virtualbox/classes/performance_collector.rb +51 -0
- data/lib/virtualbox/classes/performance_metric.rb +40 -0
- data/lib/virtualbox/classes/process.rb +67 -0
- data/lib/virtualbox/classes/progress.rb +111 -0
- data/lib/virtualbox/classes/serial_port.rb +60 -0
- data/lib/virtualbox/classes/session.rb +32 -0
- data/lib/virtualbox/classes/shared_folder.rb +32 -0
- data/lib/virtualbox/classes/snapshot.rb +44 -0
- data/lib/virtualbox/classes/storage_controller.rb +60 -0
- data/lib/virtualbox/classes/system_properties.rb +209 -0
- data/lib/virtualbox/classes/usb_controller.rb +58 -0
- data/lib/virtualbox/classes/usb_device.rb +56 -0
- data/lib/virtualbox/classes/usb_device_filter.rb +96 -0
- data/lib/virtualbox/classes/vfs_explorer.rb +51 -0
- data/lib/virtualbox/classes/virtual_box.rb +242 -0
- data/lib/virtualbox/classes/virtual_box_error_info.rb +29 -0
- data/lib/virtualbox/classes/virtual_system_description.rb +38 -0
- data/lib/virtualbox/classes/vrde_server.rb +80 -0
- data/lib/virtualbox/classes/vrde_server_info.rb +68 -0
- data/lib/virtualbox/classes/websession_manager.rb +33 -0
- data/lib/virtualbox/connection.rb +56 -31
- data/virtualbox-ws.gemspec +5 -4
- metadata +122 -20
- data/lib/virtualbox/classes/i_bios_settings.rb +0 -7
- data/lib/virtualbox/classes/i_console.rb +0 -16
- data/lib/virtualbox/classes/i_host.rb +0 -15
- data/lib/virtualbox/classes/i_host_network_interface.rb +0 -9
- data/lib/virtualbox/classes/i_machine.rb +0 -40
- data/lib/virtualbox/classes/i_managed_object_ref.rb +0 -6
- data/lib/virtualbox/classes/i_medium.rb +0 -13
- data/lib/virtualbox/classes/i_medium_format.rb +0 -6
- data/lib/virtualbox/classes/i_network_adapter.rb +0 -12
- data/lib/virtualbox/classes/i_session.rb +0 -6
- data/lib/virtualbox/classes/i_system_properties.rb +0 -18
- data/lib/virtualbox/classes/i_virtualbox.rb +0 -17
- data/lib/virtualbox/classes/i_web_session_manager.rb +0 -21
- data/lib/virtualbox/core_ext/string.rb +0 -9
- data/lib/virtualbox/enumerations.rb +0 -6
- data/lib/virtualbox/i_base.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80c77a12b207c590f0452020f4d1496c7daff5c9
|
4
|
+
data.tar.gz: aa3690fe67150ea512f352c4834afc940d57a6ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76c36a515aa156137702111ae583e4d9b8a16412cdacbd83569834dbff027df21c8592a62058687fb31735b1bdd366436e24d098c0d3763fe6b4261c45887f5a
|
7
|
+
data.tar.gz: c1af9e63a2446c9f2119edacd8fb54c4697061280c239bad9727b45e4d3183f55dde51ca46b04a74213ae441bba33390b5934522a8b256c72e466a3c3e67203e
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/LICENSE.md
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
Copyright (C) 2013 Andriy Yurchuk
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
5
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,39 +1,74 @@
|
|
1
|
+
This library is an attempt to create an object-oriented wrapper in Ruby for VirtualBox SOAP Web Service.
|
2
|
+
This library's interface basically resembles the COM interface provided by VirtualBox and described in
|
3
|
+
[VirtualBox SDK Reference](http://download.virtualbox.org/virtualbox/SDKRef.pdf) with some exceptions:
|
4
|
+
|
5
|
+
1. All classes have the leading 'I' removed so `IGuestSession` becomes `GuestSession`
|
6
|
+
2. All methods' and attributes' names are converted from camel case to underscore so `addStorageController` becomes
|
7
|
+
`add_storage_controller`
|
8
|
+
3. Interfaces and methods that are marked as not supported in the webservice in VirtualBox SDK Reference are not
|
9
|
+
supported here
|
10
|
+
|
11
|
+
Documentation
|
12
|
+
-------------
|
13
|
+
|
14
|
+
The main source of documentation is the [VirtualBox SDK Reference](http://download.virtualbox.org/virtualbox/SDKRef.pdf)
|
15
|
+
|
16
|
+
|
1
17
|
Usage
|
2
18
|
-----
|
3
19
|
|
20
|
+
Require the gem
|
21
|
+
```
|
22
|
+
irb> require 'virtualbox-ws'
|
23
|
+
=> true
|
24
|
+
```
|
25
|
+
|
4
26
|
First connect to vboxwebsrv service
|
5
27
|
```
|
6
|
-
irb>
|
28
|
+
irb> VBox::WebService.connect
|
7
29
|
=> true
|
8
30
|
```
|
31
|
+
|
9
32
|
By default it connects to `http://127.0.0.1:18083` but host and port parameters can be passed to the connect method
|
10
33
|
explicitly
|
11
|
-
|
12
|
-
To operate on the VirtualBox Web Service you need to logon to it.
|
13
34
|
```
|
14
|
-
irb>
|
15
|
-
=>
|
16
|
-
|
17
|
-
|
35
|
+
irb> VBox::WebService.connect(:host => 'localhost', :port => '18083')
|
36
|
+
=> true
|
37
|
+
```
|
38
|
+
|
39
|
+
To enable debug logging for SOAP operations a debug flag can be set for connection
|
18
40
|
```
|
19
|
-
|
20
|
-
|
41
|
+
irb > VBox::WebService.connect(:debug => true)
|
42
|
+
D, [2013-10-08T18:52:22.839743 #18132] DEBUG -- : HTTPI GET request to localhost (net_http)
|
43
|
+
=> true
|
21
44
|
```
|
22
|
-
|
23
|
-
|
45
|
+
To do anything useful on a VirtualBox installation you first have to create an instance of the VirtualBox class which
|
46
|
+
according to VirtualBox SDK Reference is "the main interface exposed by the product that provides virtual machine
|
47
|
+
management". VirtualBox instance is created upon logging on to the SOAP web service
|
24
48
|
```
|
25
|
-
|
49
|
+
irb> web_session = VBox::WebsessionManager.new
|
50
|
+
=> #<VBox::WebsessionManager:0x00000005deb4a8 @ref=nil>
|
51
|
+
irb> virtual_box = web_session.logon(:username => 'user', :password => 'password')
|
52
|
+
=> #<VBox::VirtualBox:0x000000062bc8d8 @ref="47efe040fcc25df7-000000000000001d">
|
53
|
+
|
26
54
|
```
|
27
|
-
|
28
|
-
|
29
|
-
irb> i_virtualbox.register_machine(:machine => machine)
|
30
|
-
=> nil
|
55
|
+
|
56
|
+
Having a VirtualBox instance we can query various VirtualBox installation info as well as create virtual machines...
|
31
57
|
```
|
32
|
-
|
33
|
-
|
58
|
+
irb> virtual_box.version
|
59
|
+
=> "4.2.18"
|
60
|
+
irb> machine = virtual_box.create_machine(:name => 'machine_1')
|
61
|
+
=> #<VBox::Machine:0x00000005841f98 @ref="47efe040fcc25df7-000000000000001e">
|
62
|
+
irb> virtual_box.register_machine(:machine => machine)
|
63
|
+
=> nil
|
64
|
+
2.0.0p247 :013 > machine.memory_size
|
65
|
+
=> "128"
|
66
|
+
2.0.0p247 :014 > machine.cpu_count
|
67
|
+
=> "1"
|
34
68
|
```
|
35
|
-
|
36
|
-
|
37
|
-
irb> i_machine.launch_vm_process(:session => web_session.get_session_object, :type => 'gui')
|
38
|
-
=> "deb9086e1f72ddbf-0000000000000004"
|
69
|
+
|
70
|
+
...and run virtual machines
|
39
71
|
```
|
72
|
+
irb> machine.launch_vm_process(:session => web_session.get_session_object, :type => 'headless')
|
73
|
+
=> #<VBox::Progress:0x00000005934040 @ref="47efe040fcc25df7-000000000000001f">
|
74
|
+
```
|
data/lib/virtualbox-ws.rb
CHANGED
@@ -1,6 +1,2 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
require File.expand_path(File.dirname(__FILE__) + '/virtualbox/enumerations')
|
4
|
-
|
5
|
-
classes_dir = File.expand_path(File.dirname(__FILE__)) + '/virtualbox/classes/*.rb'
|
6
|
-
Dir[classes_dir].each { |file| require file }
|
1
|
+
require 'require_all'
|
2
|
+
require_rel 'virtualbox'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_rel '/../core_ext/string.rb'
|
2
|
+
|
3
|
+
|
4
|
+
module VBox
|
5
|
+
|
6
|
+
attr_reader :ref
|
7
|
+
|
8
|
+
class Base
|
9
|
+
def initialize(obj_ref)
|
10
|
+
@ref = obj_ref
|
11
|
+
end
|
12
|
+
|
13
|
+
def _this
|
14
|
+
_this = {}
|
15
|
+
_this[:_this] = @ref unless @ref.nil?
|
16
|
+
_this
|
17
|
+
end
|
18
|
+
|
19
|
+
def vbox_class
|
20
|
+
VBox::ManagedObjectRef.new(@ref).get_interface_name
|
21
|
+
end
|
22
|
+
|
23
|
+
def delete!
|
24
|
+
VBox::ManagedObjectRef.new(@ref).release
|
25
|
+
end
|
26
|
+
|
27
|
+
def ensure_hash(args)
|
28
|
+
raise ArgumentError, 'Method arguments must be a hash' unless args.is_a?(Hash)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module VBox
|
2
|
+
class AdditionsFacility < Base
|
3
|
+
|
4
|
+
attr_reader :ref
|
5
|
+
|
6
|
+
# Attributes
|
7
|
+
|
8
|
+
def class_type
|
9
|
+
VBox::WebService.send_request(:i_additions_facility_get_class_type, _this)
|
10
|
+
end
|
11
|
+
|
12
|
+
def last_updated
|
13
|
+
VBox::WebService.send_request(:i_additions_facility_get_last_updated, _this)
|
14
|
+
end
|
15
|
+
|
16
|
+
def name
|
17
|
+
VBox::WebService.send_request(:i_additions_facility_get_name, _this)
|
18
|
+
end
|
19
|
+
|
20
|
+
def status
|
21
|
+
VBox::WebService.send_request(:i_additions_facility_get_status, _this)
|
22
|
+
end
|
23
|
+
|
24
|
+
def type
|
25
|
+
VBox::WebService.send_request(:i_additions_facility_get_type, _this)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module VBox
|
2
|
+
class Appliance < Base
|
3
|
+
|
4
|
+
attr_reader :ref
|
5
|
+
|
6
|
+
# Attributes
|
7
|
+
|
8
|
+
def path
|
9
|
+
VBox::WebService.send_request(:i_appliance_get_path, _this)
|
10
|
+
end
|
11
|
+
|
12
|
+
def disks
|
13
|
+
VBox::WebService.send_request(:i_appliance_get_disks, _this.merge)
|
14
|
+
end
|
15
|
+
|
16
|
+
def virtual_system_descriptions
|
17
|
+
virtual_system_descriptions = VBox::WebService.send_request(:i_appliance_get_virtual_system_descriptions, _this)
|
18
|
+
virtual_system_descriptions.map do |virtual_system_description|
|
19
|
+
VBox::VirtualSystemDescription.new(virtual_system_description)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def machines
|
24
|
+
VBox::WebService.send_request(:i_appliance_get_machines, _this.merge)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Methods
|
28
|
+
|
29
|
+
def create_vfs_explorer(args={})
|
30
|
+
ensure_hash(args)
|
31
|
+
vfs_explorer = VBox::WebService.send_request(:i_appliance_create_vfs_explorer, _this.merge(args))
|
32
|
+
VBox::VFSExplorer.new(vfs_explorer)
|
33
|
+
end
|
34
|
+
|
35
|
+
def interpret
|
36
|
+
VBox::WebService.send_request(:i_appliance_interpret, _this)
|
37
|
+
end
|
38
|
+
|
39
|
+
def read(args={})
|
40
|
+
ensure_hash(args)
|
41
|
+
progress = VBox::WebService.send_request(:i_appliance_read, _this.merge(args))
|
42
|
+
VBox::Progress.new(progress)
|
43
|
+
end
|
44
|
+
|
45
|
+
def write(args={})
|
46
|
+
ensure_hash(args)
|
47
|
+
progress = VBox::WebService.send_request(:i_appliance_write, _this.merge(args))
|
48
|
+
VBox::Progress.new(progress)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module VBox
|
2
|
+
class AudioAdapter < Base
|
3
|
+
|
4
|
+
attr_reader :ref
|
5
|
+
|
6
|
+
# Attributes
|
7
|
+
|
8
|
+
def enabled
|
9
|
+
VBox::WebService.send_request(:i_audio_adapter_get_enabled, _this)
|
10
|
+
end
|
11
|
+
|
12
|
+
def enabled=(enabled)
|
13
|
+
VBox::WebService.send_request(:i_audio_adapter_set_enabled, _this.merge(:enabled => enabled))
|
14
|
+
end
|
15
|
+
|
16
|
+
def audo_controller
|
17
|
+
VBox::WebService.send_request(:i_audio_adapter_get_audo_controller, _this)
|
18
|
+
end
|
19
|
+
|
20
|
+
def audo_controller=(audo_controller)
|
21
|
+
VBox::WebService.send_request(:i_audio_adapter_set_audo_controller,
|
22
|
+
_this.merge(:audo_controller => audo_controller))
|
23
|
+
end
|
24
|
+
|
25
|
+
def audo_driver
|
26
|
+
VBox::WebService.send_request(:i_audio_adapter_get_audo_driver, _this)
|
27
|
+
end
|
28
|
+
|
29
|
+
def audo_driver=(audo_driver)
|
30
|
+
VBox::WebService.send_request(:i_audio_adapter_set_audo_driver, _this.merge(:audo_driver => audo_driver))
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module VBox
|
2
|
+
class BandwidthControl < Base
|
3
|
+
|
4
|
+
attr_reader :ref
|
5
|
+
|
6
|
+
# Attributes
|
7
|
+
|
8
|
+
def num_groups
|
9
|
+
VBox::WebService.send_request(:i_bandwidth_control_get_num_groups, _this)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Methods
|
13
|
+
|
14
|
+
def create_bandwidth_group(args={})
|
15
|
+
ensure_hash(args)
|
16
|
+
VBox::WebService.send_request(:i_bandwidth_contol_create_bandwidth_group, _this.merge(args))
|
17
|
+
end
|
18
|
+
|
19
|
+
def delete_bandwidth_group(args={})
|
20
|
+
ensure_hash(args)
|
21
|
+
VBox::WebService.send_request(:i_bandwidth_control_delete_bandwidth_group, _this.merge(args))
|
22
|
+
end
|
23
|
+
|
24
|
+
def get_all_bandwidth_groups
|
25
|
+
bandwidth_groups = VBox::WebService.send_request(:i_bandwidth_control_get_all_bandwidth_groups, _this)
|
26
|
+
bandwidth_groups.map do |bandwidth_group|
|
27
|
+
VBox::BandwidthGroup.new(bandwidth_group)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def get_bandwidth_group
|
32
|
+
bandwidth_group = VBox::WebService.send_request(:i_bandwidth_control_get_bandwidth_group, _this)
|
33
|
+
VBox::BandwidthGroup.new(bandwidth_group)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module VBox
|
2
|
+
class BandwidthGroup < Base
|
3
|
+
|
4
|
+
attr_reader :ref
|
5
|
+
|
6
|
+
# Attributes
|
7
|
+
|
8
|
+
def name
|
9
|
+
VBox::WebService.send_request(:i_bandwidth_group_get_name, _this)
|
10
|
+
end
|
11
|
+
|
12
|
+
def type
|
13
|
+
VBox::WebService.send_request(:i_bandwidth_group_get_type, _this)
|
14
|
+
end
|
15
|
+
|
16
|
+
def reference
|
17
|
+
VBox::WebService.send_request(:i_bandwidth_group_get_reference, _this)
|
18
|
+
end
|
19
|
+
|
20
|
+
def max_bytes_per_sec
|
21
|
+
VBox::WebService.send_request(:i_bandwidth_group_get_max_bytes_per_sec, _this)
|
22
|
+
end
|
23
|
+
|
24
|
+
def max_bytes_per_sec=(max_bytes_per_sec)
|
25
|
+
VBox::WebService.send_request(:i_bandwidth_group_get_max_bytes_per_sec,
|
26
|
+
_this.merge(:max_bytes_per_sec => max_bytes_per_sec))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
module VBox
|
2
|
+
class BIOSSettings < Base
|
3
|
+
|
4
|
+
attr_reader :ref
|
5
|
+
|
6
|
+
# Attributes
|
7
|
+
|
8
|
+
def logo_fade_in
|
9
|
+
VBox::WebService.send_request(:ibios_settings_get_logo_fade_in, _this)
|
10
|
+
end
|
11
|
+
|
12
|
+
def logo_fade_in=(logo_fade_in)
|
13
|
+
VBox::WebService.send_request(:ibios_settings_set_logo_fade_in, _this.merge(:logo_fade_in => logo_fade_in))
|
14
|
+
end
|
15
|
+
|
16
|
+
def logo_fade_out
|
17
|
+
VBox::WebService.send_request(:ibios_settings_get_logo_fade_out, _this)
|
18
|
+
end
|
19
|
+
|
20
|
+
def logo_fade_out=(logo_fade_out)
|
21
|
+
VBox::WebService.send_request(:ibios_settings_set_logo_fade_out, _this.merge(:logo_fade_out => logo_fade_out))
|
22
|
+
end
|
23
|
+
|
24
|
+
def logo_display_time
|
25
|
+
VBox::WebService.send_request(:ibios_settings_get_logo_display_time, _this)
|
26
|
+
end
|
27
|
+
|
28
|
+
def logo_display_time=(logo_display_time)
|
29
|
+
VBox::WebService.send_request(:ibios_settings_set_logo_display_time,
|
30
|
+
_this.merge(:logo_display_time => logo_display_time))
|
31
|
+
end
|
32
|
+
|
33
|
+
def logo_image_path
|
34
|
+
VBox::WebService.send_request(:ibios_settings_get_logo_image_path, _this)
|
35
|
+
end
|
36
|
+
|
37
|
+
def logo_image_path=(logo_image_path)
|
38
|
+
VBox::WebService.send_request(:ibios_settings_set_logo_image_path, _this.merge(:logo_image_path => logo_image_path))
|
39
|
+
end
|
40
|
+
|
41
|
+
def boot_menu_mode
|
42
|
+
VBox::WebService.send_request(:ibios_settings_get_boot_menu_mode, _this)
|
43
|
+
end
|
44
|
+
|
45
|
+
def boot_menu_mode=(boot_menu_mode)
|
46
|
+
VBox::WebService.send_request(:ibios_settings_set_boot_menu_mode, _this.merge(:boot_menu_mode => boot_menu_mode))
|
47
|
+
end
|
48
|
+
|
49
|
+
def acpi_enabled
|
50
|
+
VBox::WebService.send_request(:ibios_settings_get_acpi_enabled, _this)
|
51
|
+
end
|
52
|
+
|
53
|
+
def acpi_enabled=(acpi_enabled)
|
54
|
+
VBox::WebService.send_request(:ibios_settings_set_acpi_enabled, _this.merge('ACPIEnabled' => acpi_enabled))
|
55
|
+
end
|
56
|
+
|
57
|
+
def ioapic_enabled
|
58
|
+
VBox::WebService.send_request(:ibios_settings_get_ioapic_enabled, _this)
|
59
|
+
end
|
60
|
+
|
61
|
+
def ioapic_enabled=(ioapic_enabled)
|
62
|
+
VBox::WebService.send_request(:ibios_settings_set_ioapic_enabled, _this.merge('IOAPICEnabled' => ioapic_enabled))
|
63
|
+
end
|
64
|
+
|
65
|
+
def time_offset
|
66
|
+
VBox::WebService.send_request(:ibios_settings_get_time_offset, _this)
|
67
|
+
end
|
68
|
+
|
69
|
+
def time_offset=(time_offset)
|
70
|
+
VBox::WebService.send_request(:ibios_settings_set_time_offset, _this.merge(:time_offset => time_offset))
|
71
|
+
end
|
72
|
+
|
73
|
+
def pxe_debug_enabled
|
74
|
+
VBox::WebService.send_request(:ibios_settings_get_pxe_debug_enabled, _this)
|
75
|
+
end
|
76
|
+
|
77
|
+
def pxe_debug_enabled=(pxe_debug_enabled)
|
78
|
+
VBox::WebService.send_request(:ibios_settings_set_pxe_debug_enabled, _this.merge('PXEDebugEnabled' => pxe_debug_enabled))
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|