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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -1
  3. data/Gemfile +2 -1
  4. data/Gemfile.lock +2 -0
  5. data/LICENSE.md +5 -0
  6. data/README.md +57 -22
  7. data/lib/core_ext/string.rb +5 -0
  8. data/lib/virtualbox-ws.rb +2 -6
  9. data/lib/virtualbox/base.rb +31 -0
  10. data/lib/virtualbox/classes/additions_facility.rb +28 -0
  11. data/lib/virtualbox/classes/appliance.rb +51 -0
  12. data/lib/virtualbox/classes/audio_adapter.rb +33 -0
  13. data/lib/virtualbox/classes/bandwidth_control.rb +36 -0
  14. data/lib/virtualbox/classes/bandwidth_group.rb +29 -0
  15. data/lib/virtualbox/classes/bios_settings.rb +81 -0
  16. data/lib/virtualbox/classes/console.rb +201 -0
  17. data/lib/virtualbox/classes/dhcp_server.rb +52 -0
  18. data/lib/virtualbox/classes/directory.rb +27 -0
  19. data/lib/virtualbox/classes/display.rb +47 -0
  20. data/lib/virtualbox/classes/event.rb +32 -0
  21. data/lib/virtualbox/classes/event_listener.rb +14 -0
  22. data/lib/virtualbox/classes/event_source.rb +62 -0
  23. data/lib/virtualbox/classes/events/additions_state_changed_event.rb +7 -0
  24. data/lib/virtualbox/classes/events/bandwidth_group_changed_event.rb +13 -0
  25. data/lib/virtualbox/classes/events/can_show_window_event.rb +7 -0
  26. data/lib/virtualbox/classes/events/clipboard_mode_changed_event.rb +12 -0
  27. data/lib/virtualbox/classes/events/cpu_changed_event.rb +16 -0
  28. data/lib/virtualbox/classes/events/cpu_execution_cap_changed_event.rb +12 -0
  29. data/lib/virtualbox/classes/events/drag_and_drop_mode_changed_event.rb +12 -0
  30. data/lib/virtualbox/classes/events/event_source_changed_event.rb +17 -0
  31. data/lib/virtualbox/classes/events/extra_data_can_change_event.rb +20 -0
  32. data/lib/virtualbox/classes/events/extra_data_changed_event.rb +20 -0
  33. data/lib/virtualbox/classes/events/guest_keyboard_event.rb +12 -0
  34. data/lib/virtualbox/classes/events/guest_monitor_changed_event.rb +32 -0
  35. data/lib/virtualbox/classes/events/guest_mouse_event.rb +32 -0
  36. data/lib/virtualbox/classes/events/guest_property_changed_event.rb +20 -0
  37. data/lib/virtualbox/classes/events/host_pci_device_plug_event.rb +24 -0
  38. data/lib/virtualbox/classes/events/keyboard_leds_changed_event.rb +20 -0
  39. data/lib/virtualbox/classes/events/machine_data_changed_event.rb +12 -0
  40. data/lib/virtualbox/classes/events/machine_event.rb +12 -0
  41. data/lib/virtualbox/classes/events/machine_registered_event.rb +12 -0
  42. data/lib/virtualbox/classes/events/machine_state_changed_event.rb +12 -0
  43. data/lib/virtualbox/classes/events/medium_changed_event.rb +13 -0
  44. data/lib/virtualbox/classes/events/medium_registered_event.rb +20 -0
  45. data/lib/virtualbox/classes/events/mouse_capability_changed_event.rb +20 -0
  46. data/lib/virtualbox/classes/events/mouse_pointer_shape_changed_event.rb +36 -0
  47. data/lib/virtualbox/classes/events/nat_redirect_event.rb +40 -0
  48. data/lib/virtualbox/classes/events/network_adapter_changed_event.rb +13 -0
  49. data/lib/virtualbox/classes/events/parallel_port_changed_event.rb +13 -0
  50. data/lib/virtualbox/classes/events/reusable_event.rb +18 -0
  51. data/lib/virtualbox/classes/events/runtime_error_event.rb +20 -0
  52. data/lib/virtualbox/classes/events/serial_port_changed_event.rb +13 -0
  53. data/lib/virtualbox/classes/events/session_state_changed_event.rb +12 -0
  54. data/lib/virtualbox/classes/events/shared_folder_changed_event.rb +12 -0
  55. data/lib/virtualbox/classes/events/show_window_event.rb +12 -0
  56. data/lib/virtualbox/classes/events/snapshot_changed_event.rb +7 -0
  57. data/lib/virtualbox/classes/events/snapshot_deleted_event.rb +7 -0
  58. data/lib/virtualbox/classes/events/snapshot_event.rb +12 -0
  59. data/lib/virtualbox/classes/events/snapshot_taken_event.rb +7 -0
  60. data/lib/virtualbox/classes/events/state_changed_event.rb +12 -0
  61. data/lib/virtualbox/classes/events/storage_controller_changed_event.rb +7 -0
  62. data/lib/virtualbox/classes/events/storage_device_changed_event.rb +16 -0
  63. data/lib/virtualbox/classes/events/usb_controller_changed_event.rb +7 -0
  64. data/lib/virtualbox/classes/events/usb_device_state_changed_event.rb +17 -0
  65. data/lib/virtualbox/classes/events/v_box_svc_availability_chaged_event.rb +12 -0
  66. data/lib/virtualbox/classes/events/veto_event.rb +21 -0
  67. data/lib/virtualbox/classes/events/vrde_server_changed_event.rb +7 -0
  68. data/lib/virtualbox/classes/events/vrde_server_info_changed_event.rb +7 -0
  69. data/lib/virtualbox/classes/file.rb +73 -0
  70. data/lib/virtualbox/classes/fs_obj_info.rb +84 -0
  71. data/lib/virtualbox/classes/guest.rb +134 -0
  72. data/lib/virtualbox/classes/guest_directory.rb +7 -0
  73. data/lib/virtualbox/classes/guest_file.rb +7 -0
  74. data/lib/virtualbox/classes/guest_fs_obj_info.rb +7 -0
  75. data/lib/virtualbox/classes/guest_process.rb +7 -0
  76. data/lib/virtualbox/classes/guest_session.rb +232 -0
  77. data/lib/virtualbox/classes/host.rb +172 -0
  78. data/lib/virtualbox/classes/host_network_interface.rb +78 -0
  79. data/lib/virtualbox/classes/host_usb_device.rb +12 -0
  80. data/lib/virtualbox/classes/host_usb_device_filter.rb +16 -0
  81. data/lib/virtualbox/classes/keyboard.rb +29 -0
  82. data/lib/virtualbox/classes/machine.rb +922 -0
  83. data/lib/virtualbox/classes/managed_object_ref.rb +15 -0
  84. data/lib/virtualbox/classes/medium.rb +224 -0
  85. data/lib/virtualbox/classes/medium_format.rb +30 -0
  86. data/lib/virtualbox/classes/mouse.rb +37 -0
  87. data/lib/virtualbox/classes/nat_engine.rb +107 -0
  88. data/lib/virtualbox/classes/network_adapter.rb +171 -0
  89. data/lib/virtualbox/classes/parallel_port.rb +44 -0
  90. data/lib/virtualbox/classes/performance_collector.rb +51 -0
  91. data/lib/virtualbox/classes/performance_metric.rb +40 -0
  92. data/lib/virtualbox/classes/process.rb +67 -0
  93. data/lib/virtualbox/classes/progress.rb +111 -0
  94. data/lib/virtualbox/classes/serial_port.rb +60 -0
  95. data/lib/virtualbox/classes/session.rb +32 -0
  96. data/lib/virtualbox/classes/shared_folder.rb +32 -0
  97. data/lib/virtualbox/classes/snapshot.rb +44 -0
  98. data/lib/virtualbox/classes/storage_controller.rb +60 -0
  99. data/lib/virtualbox/classes/system_properties.rb +209 -0
  100. data/lib/virtualbox/classes/usb_controller.rb +58 -0
  101. data/lib/virtualbox/classes/usb_device.rb +56 -0
  102. data/lib/virtualbox/classes/usb_device_filter.rb +96 -0
  103. data/lib/virtualbox/classes/vfs_explorer.rb +51 -0
  104. data/lib/virtualbox/classes/virtual_box.rb +242 -0
  105. data/lib/virtualbox/classes/virtual_box_error_info.rb +29 -0
  106. data/lib/virtualbox/classes/virtual_system_description.rb +38 -0
  107. data/lib/virtualbox/classes/vrde_server.rb +80 -0
  108. data/lib/virtualbox/classes/vrde_server_info.rb +68 -0
  109. data/lib/virtualbox/classes/websession_manager.rb +33 -0
  110. data/lib/virtualbox/connection.rb +56 -31
  111. data/virtualbox-ws.gemspec +5 -4
  112. metadata +122 -20
  113. data/lib/virtualbox/classes/i_bios_settings.rb +0 -7
  114. data/lib/virtualbox/classes/i_console.rb +0 -16
  115. data/lib/virtualbox/classes/i_host.rb +0 -15
  116. data/lib/virtualbox/classes/i_host_network_interface.rb +0 -9
  117. data/lib/virtualbox/classes/i_machine.rb +0 -40
  118. data/lib/virtualbox/classes/i_managed_object_ref.rb +0 -6
  119. data/lib/virtualbox/classes/i_medium.rb +0 -13
  120. data/lib/virtualbox/classes/i_medium_format.rb +0 -6
  121. data/lib/virtualbox/classes/i_network_adapter.rb +0 -12
  122. data/lib/virtualbox/classes/i_session.rb +0 -6
  123. data/lib/virtualbox/classes/i_system_properties.rb +0 -18
  124. data/lib/virtualbox/classes/i_virtualbox.rb +0 -17
  125. data/lib/virtualbox/classes/i_web_session_manager.rb +0 -21
  126. data/lib/virtualbox/core_ext/string.rb +0 -9
  127. data/lib/virtualbox/enumerations.rb +0 -6
  128. data/lib/virtualbox/i_base.rb +0 -51
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c19d181323956fc9c6a21c66e82471f872f5f09c
4
- data.tar.gz: 14ef98271b843289e6d4fcbdc893971ba941a8f9
3
+ metadata.gz: 80c77a12b207c590f0452020f4d1496c7daff5c9
4
+ data.tar.gz: aa3690fe67150ea512f352c4834afc940d57a6ba
5
5
  SHA512:
6
- metadata.gz: 2244297783f0448236657edd24e391d0c70fb68b1d8437a37dfbc14374d7f5c0c235cfd118440532cb4a323edfd2c6c6b8ed0841968c6ad2afb6bd640ee95145
7
- data.tar.gz: db8aa2318dbefec7af12b7e18b1d1b98675d471976f5c3d502373f2ffb729fb0e49ec21390f5d2cdaf8d6d9fea712a0f390e192b9d1ac996071521577cd311c5
6
+ metadata.gz: 76c36a515aa156137702111ae583e4d9b8a16412cdacbd83569834dbff027df21c8592a62058687fb31735b1bdd366436e24d098c0d3763fe6b4261c45887f5a
7
+ data.tar.gz: c1af9e63a2446c9f2119edacd8fb54c4697061280c239bad9727b45e4d3183f55dde51ca46b04a74213ae441bba33390b5934522a8b256c72e466a3c3e67203e
data/.gitignore CHANGED
@@ -1 +1,3 @@
1
- .idea
1
+ .idea
2
+ tests/*
3
+ *.gem
data/Gemfile CHANGED
@@ -1,3 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'savon'
3
+ gem 'require_all'
4
+ gem 'savon'
data/Gemfile.lock CHANGED
@@ -13,6 +13,7 @@ GEM
13
13
  nokogiri (1.5.10)
14
14
  nori (2.3.0)
15
15
  rack (1.5.2)
16
+ require_all (1.3.1)
16
17
  rubyntlm (0.3.4)
17
18
  savon (2.3.0)
18
19
  akami (~> 1.2.0)
@@ -30,4 +31,5 @@ PLATFORMS
30
31
  ruby
31
32
 
32
33
  DEPENDENCIES
34
+ require_all
33
35
  savon
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> VirtualBoxWS.connect
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> web_session = VirtualBoxWS::IWebsessionManager.new
15
- => #<VirtualBoxWS::IWebsessionManager:0x0000000383b9b0 @_this={}>
16
- irb> key = web_session.logon(:username => 'john', :password => 'doe')
17
- => "deb9086e1f72ddbf-0000000000000002"
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
- Having a key we can now create an instance of IVirtualBox class, which is basically the entry point for the whole
20
- VirtualBox operations scope.
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
- irb> i_virtualbox = VirtualBoxWS::IVirtualBox.new(key)
23
- => #<VirtualBoxWS::IVirtualBox:0x0000000352a028 @_this={:_this=>"deb9086e1f72ddbf-0000000000000002"}>
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
- Now having an IVirtualBox we are ready to do something useful. The following will create a very basic virtual machine
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
- irb> machine = i_virtualbox.create_machine(:name => 'JohnDoe')
28
- => "deb9086e1f72ddbf-0000000000000003"
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
- To start the machine we've just created we first need to create an instance of IMachine passing it our machine's
33
- object reference. After that we are able to execute launch_vm_process on this instance
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
- irb> i_machine = VirtualBoxWS::IMachine.new(machine)
36
- => #<VirtualBoxWS::IMachine:0x000000047fdee8 @_this={:_this=>"deb9086e1f72ddbf-0000000000000003"}>
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
+ ```
@@ -0,0 +1,5 @@
1
+ class String
2
+ def to_a
3
+ self.split
4
+ end
5
+ end
data/lib/virtualbox-ws.rb CHANGED
@@ -1,6 +1,2 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/virtualbox/connection')
2
- require File.expand_path(File.dirname(__FILE__) + '/virtualbox/i_base')
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