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
@@ -0,0 +1,134 @@
|
|
1
|
+
module VBox
|
2
|
+
class Guest < Base
|
3
|
+
|
4
|
+
attr_reader :ref
|
5
|
+
|
6
|
+
# Attributes
|
7
|
+
|
8
|
+
def os_type_id
|
9
|
+
VBox::WebService.send_request(:i_guest_get_os_type_id, _this)
|
10
|
+
end
|
11
|
+
|
12
|
+
def additions_run_level
|
13
|
+
VBox::WebService.send_request(:i_guest_get_additions_run_level, _this)
|
14
|
+
end
|
15
|
+
|
16
|
+
def additions_version
|
17
|
+
VBox::WebService.send_request(:i_guest_get_additions_version, _this)
|
18
|
+
end
|
19
|
+
|
20
|
+
def additions_revision
|
21
|
+
VBox::WebService.send_request(:i_guest_get_additions_revision, _this)
|
22
|
+
end
|
23
|
+
|
24
|
+
def facilities
|
25
|
+
additions_facilities = VBox::WebService.send_request(:i_guest_get_facilities, _this)
|
26
|
+
additions_facilities.map do |additions_facility|
|
27
|
+
VBox::AdditionsFacility.new(additions_facility)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def sessions
|
32
|
+
sessions = VBox::WebService.send_request(:i_guest_get_sessions, _this)
|
33
|
+
sessions.map do |session|
|
34
|
+
VBox::GuestSession.new(session)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def memory_balloon_size
|
39
|
+
VBox::WebService.send_request(:i_guest_get_memory_balloon_size, _this)
|
40
|
+
end
|
41
|
+
|
42
|
+
def memory_balloon_size=(memory_balloon_size)
|
43
|
+
VBox::WebService.send_request(:i_guest_set_memory_balloon_size,
|
44
|
+
_this.merge(:memory_balloon_size => memory_balloon_size))
|
45
|
+
end
|
46
|
+
|
47
|
+
def statistics_update_interval
|
48
|
+
VBox::WebService.send_request(:i_guest_get_statistics_update_interval, _this)
|
49
|
+
end
|
50
|
+
|
51
|
+
def statistics_update_interval=(statistics_update_interval)
|
52
|
+
VBox::WebService.send_request(:i_guest_set_statistics_update_interval,
|
53
|
+
_this.merge(:statistics_update_interval => statistics_update_interval))
|
54
|
+
end
|
55
|
+
|
56
|
+
# Methods
|
57
|
+
|
58
|
+
def create_session(args={})
|
59
|
+
ensure_hash(args)
|
60
|
+
guest_session = VBox::WebService.send_request(:i_guest_create_session, _this.merge(args))
|
61
|
+
VBox::GuestSession.new(guest_session)
|
62
|
+
end
|
63
|
+
|
64
|
+
def drag_gh_dropped(args={})
|
65
|
+
ensure_hash(args)
|
66
|
+
progress = VBox::WebService.send_request(:i_guest_drag_gh_dropped, _this.merge(args))
|
67
|
+
VBox::Progress.new(progress)
|
68
|
+
end
|
69
|
+
|
70
|
+
def drag_gh_get_data
|
71
|
+
VBox::WebService.send_request(:i_guest_drag_gh_get_data, _this)
|
72
|
+
end
|
73
|
+
|
74
|
+
def drag_gh_pending(args={})
|
75
|
+
ensure_hash(args)
|
76
|
+
VBox::WebService.send_request(:i_guest_drag_gh_pending, _this.merge(args))
|
77
|
+
end
|
78
|
+
|
79
|
+
def drag_hg_drop(args={})
|
80
|
+
ensure_hash(args)
|
81
|
+
VBox::WebService.send_request(:i_guest_drag_hg_drop, _this.merge(args))
|
82
|
+
end
|
83
|
+
|
84
|
+
def drag_hg_enter(args={})
|
85
|
+
ensure_hash(args)
|
86
|
+
VBox::WebService.send_request(:i_guest_drag_hg_enter, _this.merge(args))
|
87
|
+
end
|
88
|
+
|
89
|
+
def drag_hg_leave(args={})
|
90
|
+
ensure_hash(args)
|
91
|
+
VBox::WebService.send_request(:i_guest_drag_hg_leave, _this.merge(args))
|
92
|
+
end
|
93
|
+
|
94
|
+
def drag_hg_move(args={})
|
95
|
+
ensure_hash(args)
|
96
|
+
VBox::WebService.send_request(:i_guest_drag_hg_move, _this.merge(args))
|
97
|
+
end
|
98
|
+
|
99
|
+
def drag_hg_put_data(args={})
|
100
|
+
ensure_hash(args)
|
101
|
+
progress = VBox::WebService.send_request(:i_guest_drag_hg_put_data, _this.merge(args))
|
102
|
+
VBox::Progress.new(progress)
|
103
|
+
end
|
104
|
+
|
105
|
+
def find_session(args={})
|
106
|
+
ensure_hash(args)
|
107
|
+
guest_session = VBox::WebService.send_request(:i_guest_find_session, _this.merge(args))
|
108
|
+
VBox::GuestSession.new(guest_session)
|
109
|
+
end
|
110
|
+
|
111
|
+
def get_additions_status
|
112
|
+
VBox::WebService.send_request(:i_guest_get_additions_status, _this)
|
113
|
+
end
|
114
|
+
|
115
|
+
def get_facility_status
|
116
|
+
VBox::WebService.send_request(:i_guest_get_facility_status, _this)
|
117
|
+
end
|
118
|
+
|
119
|
+
def internal_get_facility_statistics
|
120
|
+
VBox::WebService.send_request(:i_guest_internal_get_facility_statistics, _this)
|
121
|
+
end
|
122
|
+
|
123
|
+
def set_credentials(args={})
|
124
|
+
ensure_hash(args)
|
125
|
+
VBox::WebService.send_request(:i_guest_set_credentials, _this.merge(args))
|
126
|
+
end
|
127
|
+
|
128
|
+
def update_guest_additions(args={})
|
129
|
+
ensure_hash(args)
|
130
|
+
progress = VBox::WebService.send_request(:i_guest_update_guest_additions, _this.merge(args))
|
131
|
+
VBox::Progress.new(progress)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
@@ -0,0 +1,232 @@
|
|
1
|
+
module VBox
|
2
|
+
class GuestSession < Base
|
3
|
+
|
4
|
+
attr_reader :ref
|
5
|
+
|
6
|
+
# Attributes
|
7
|
+
|
8
|
+
def user
|
9
|
+
VBox::WebService.send_request(:i_guest_session_get_user, _this)
|
10
|
+
end
|
11
|
+
|
12
|
+
def domain
|
13
|
+
VBox::WebService.send_request(:i_guest_session_get_domain, _this)
|
14
|
+
end
|
15
|
+
|
16
|
+
def name
|
17
|
+
VBox::WebService.send_request(:i_guest_session_get_name, _this)
|
18
|
+
end
|
19
|
+
|
20
|
+
def id
|
21
|
+
VBox::WebService.send_request(:i_guest_session_get_id, _this)
|
22
|
+
end
|
23
|
+
|
24
|
+
def timeout
|
25
|
+
VBox::WebService.send_request(:i_guest_session_get_timeout, _this)
|
26
|
+
end
|
27
|
+
|
28
|
+
def timeout=(timeout)
|
29
|
+
VBox::WebService.send_request(:i_guest_session_set_timeout, _this.merge(:timeout => timeout))
|
30
|
+
end
|
31
|
+
|
32
|
+
def environment
|
33
|
+
VBox::WebService.send_request(:i_guest_session_get_environment, _this)
|
34
|
+
end
|
35
|
+
|
36
|
+
def environment=(environment)
|
37
|
+
VBox::WebService.send_request(:i_guest_session_set_environment, _this.merge(:environment => environment))
|
38
|
+
end
|
39
|
+
|
40
|
+
def processes
|
41
|
+
guest_processes = VBox::WebService.send_request(:i_guest_session_get_processes, _this)
|
42
|
+
guest_processes.map do |guest_process|
|
43
|
+
VBox::GuestProcess.new(guest_process)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def directories
|
48
|
+
directories = VBox::WebService.send_request(:i_guest_session_get_directories, _this)
|
49
|
+
directories.map do |directory|
|
50
|
+
VBox::GuestDirectory.new(directory)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def files
|
55
|
+
files = VBox::WebService.send_request(:i_guest_session_get_files, _this)
|
56
|
+
files.map do |file|
|
57
|
+
VBox::GuestFile.new(file)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Methods
|
62
|
+
|
63
|
+
def close
|
64
|
+
VBox::WebService.send_request(:i_guest_session_close, _this)
|
65
|
+
end
|
66
|
+
|
67
|
+
def copy_from(args={})
|
68
|
+
ensure_hash(args)
|
69
|
+
progress = VBox::WebService.send_request(:i_guest_session_copy_from, _this.merge(args))
|
70
|
+
VBox::Progress.new(progress)
|
71
|
+
end
|
72
|
+
|
73
|
+
def copy_to(args={})
|
74
|
+
ensure_hash(args)
|
75
|
+
progress = VBox::WebService.send_request(:i_guest_session_copy_to, _this.merge(args))
|
76
|
+
VBox::Progress.new(progress)
|
77
|
+
end
|
78
|
+
|
79
|
+
def directory_create(args={})
|
80
|
+
ensure_hash(args)
|
81
|
+
VBox::WebService.send_request(:i_guest_session_directory_create, _this.merge(args))
|
82
|
+
end
|
83
|
+
|
84
|
+
def directory_create_temp(args={})
|
85
|
+
ensure_hash(args)
|
86
|
+
VBox::WebService.send_request(:i_guest_session_directory_create_temp, _this.merge(args))
|
87
|
+
end
|
88
|
+
|
89
|
+
def directory_exists(args={})
|
90
|
+
ensure_hash(args)
|
91
|
+
VBox::WebService.send_request(:i_guest_session_directory_exists, _this.merge(args))
|
92
|
+
end
|
93
|
+
|
94
|
+
def directory_open(args={})
|
95
|
+
ensure_hash(args)
|
96
|
+
guest_directory = VBox::WebService.send_request(:i_guest_session_directory_open, _this.merge(args))
|
97
|
+
VBox::GuestDirectory.new(guest_directory)
|
98
|
+
end
|
99
|
+
|
100
|
+
def directory_query_info(args={})
|
101
|
+
ensure_hash(args)
|
102
|
+
fs_obj_info = VBox::WebService.send_request(:i_guest_session_directory_query_info, _this.merge(args))
|
103
|
+
VBox::GuestFsObjInfo.new(fs_obj_info)
|
104
|
+
end
|
105
|
+
|
106
|
+
def directory_remove(args={})
|
107
|
+
ensure_hash(args)
|
108
|
+
VBox::WebService.send_request(:i_guest_session_directory_remove, _this.merge(args))
|
109
|
+
end
|
110
|
+
|
111
|
+
def directory_remove_recursive(args={})
|
112
|
+
ensure_hash(args)
|
113
|
+
progress = VBox::WebService.send_request(:i_guest_session_directory_remove_recursive, _this.merge(args))
|
114
|
+
VBox::Progress.new(progress)
|
115
|
+
end
|
116
|
+
|
117
|
+
def directory_rename(args={})
|
118
|
+
ensure_hash(args)
|
119
|
+
VBox::WebService.send_request(:i_guest_session_directory_rename, _this.merge(args))
|
120
|
+
end
|
121
|
+
|
122
|
+
def directory_set_acl(args={})
|
123
|
+
ensure_hash(args)
|
124
|
+
VBox::WebService.send_request(:i_guest_session_directory_set_acl, _this.merge(args))
|
125
|
+
end
|
126
|
+
|
127
|
+
def environment_clear
|
128
|
+
VBox::WebService.send_request(:i_guest_session_environment_clear, _this)
|
129
|
+
end
|
130
|
+
|
131
|
+
def environment_get(args={})
|
132
|
+
ensure_hash(args)
|
133
|
+
VBox::WebService.send_request(:i_guest_session_environment_get, _this.merge(args))
|
134
|
+
end
|
135
|
+
|
136
|
+
def environment_set(args={})
|
137
|
+
ensure_hash(args)
|
138
|
+
VBox::WebService.send_request(:i_guest_session_environment_set, _this.merge(args))
|
139
|
+
end
|
140
|
+
|
141
|
+
def environment_unset(args={})
|
142
|
+
ensure_hash(args)
|
143
|
+
VBox::WebService.send_request(:i_guest_session_environment_unset, _this.merge(args))
|
144
|
+
end
|
145
|
+
|
146
|
+
def file_create_temp(args={})
|
147
|
+
ensure_hash(args)
|
148
|
+
guest_file = VBox::WebService.send_request(:i_guest_session_file_create_temp, _this.merge(args))
|
149
|
+
VBox::GuestFile.new(guest_file)
|
150
|
+
end
|
151
|
+
|
152
|
+
def file_exists(args={})
|
153
|
+
ensure_hash(args)
|
154
|
+
VBox::WebService.send_request(:i_guest_session_file_exists, _this.merge(args))
|
155
|
+
end
|
156
|
+
|
157
|
+
def file_open(args={})
|
158
|
+
ensure_hash(args)
|
159
|
+
guest_file = VBox::WebService.send_request(:i_guest_session_file_open, _this.merge(args))
|
160
|
+
VBox::GuestFile.new(guest_file)
|
161
|
+
end
|
162
|
+
|
163
|
+
def file_query_info(args={})
|
164
|
+
ensure_hash(args)
|
165
|
+
fs_obj_info = VBox::WebService.send_request(:i_guest_session_file_query_info, _this.merge(args))
|
166
|
+
VBox::GuestFsObjInfo.new(fs_obj_info)
|
167
|
+
end
|
168
|
+
|
169
|
+
def file_query_size(args={})
|
170
|
+
ensure_hash(args)
|
171
|
+
VBox::WebService.send_request(:i_guest_session_file_query_size, _this.merge(args))
|
172
|
+
end
|
173
|
+
|
174
|
+
def file_remove(args={})
|
175
|
+
ensure_hash(args)
|
176
|
+
VBox::WebService.send_request(:i_guest_session_file_remove, _this.merge(args))
|
177
|
+
end
|
178
|
+
|
179
|
+
def file_rename(args={})
|
180
|
+
ensure_hash(args)
|
181
|
+
VBox::WebService.send_request(:i_guest_session_file_rename, _this.merge(args))
|
182
|
+
end
|
183
|
+
|
184
|
+
def file_set_acl(args={})
|
185
|
+
ensure_hash(args)
|
186
|
+
VBox::WebService.send_request(:i_guest_session_file_set_acl, _this.merge(args))
|
187
|
+
end
|
188
|
+
|
189
|
+
def process_create(args={})
|
190
|
+
ensure_hash(args)
|
191
|
+
guest_process = VBox::WebService.send_request(:i_guest_session_process_create, _this.merge(args))
|
192
|
+
VBox::GuestProcess.new(guest_process)
|
193
|
+
end
|
194
|
+
|
195
|
+
def process_create_ex(args={})
|
196
|
+
ensure_hash(args)
|
197
|
+
guest_process = VBox::WebService.send_request(:i_guest_session_process_create_ex, _this.merge(args))
|
198
|
+
VBox::GuestProcess.new(guest_process)
|
199
|
+
end
|
200
|
+
|
201
|
+
def process_get(args={})
|
202
|
+
ensure_hash(args)
|
203
|
+
guest_process = VBox::WebService.send_request(:i_guest_session_process_get, _this.merge(args))
|
204
|
+
VBox::GuestProcess.new(guest_process)
|
205
|
+
end
|
206
|
+
|
207
|
+
def symlink_create(args={})
|
208
|
+
ensure_hash(args)
|
209
|
+
VBox::WebService.send_request(:i_guest_session_symlink_create, _this.merge(args))
|
210
|
+
end
|
211
|
+
|
212
|
+
def symlink_exists(args={})
|
213
|
+
ensure_hash(args)
|
214
|
+
VBox::WebService.send_request(:i_guest_session_symlink_exists, _this.merge(args))
|
215
|
+
end
|
216
|
+
|
217
|
+
def symlink_read(args={})
|
218
|
+
ensure_hash(args)
|
219
|
+
VBox::WebService.send_request(:i_guest_session_symlink_read, _this.merge(args))
|
220
|
+
end
|
221
|
+
|
222
|
+
def symlink_remove_directory(args={})
|
223
|
+
ensure_hash(args)
|
224
|
+
VBox::WebService.send_request(:i_guest_session_symlink_remove_directory, _this.merge(args))
|
225
|
+
end
|
226
|
+
|
227
|
+
def symlink_remove_file(args={})
|
228
|
+
ensure_hash(args)
|
229
|
+
VBox::WebService.send_request(:i_guest_session_symlink_remove_file, _this.merge(args))
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
@@ -0,0 +1,172 @@
|
|
1
|
+
module VBox
|
2
|
+
class Host < Base
|
3
|
+
|
4
|
+
attr_reader :ref
|
5
|
+
|
6
|
+
# Attributes
|
7
|
+
|
8
|
+
def dvd_drives
|
9
|
+
dvd_drives = VBox::WebService.send_request(:i_host_get_dvd_drives, _this)
|
10
|
+
dvd_drives.to_a.map do |dvd_drive|
|
11
|
+
VBox::Medium.new(dvd_drive)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def floppy_drives
|
16
|
+
floppy_drives = VBox::WebService.send_request(:i_host_get_floppy_drives, _this)
|
17
|
+
floppy_drives.to_a.map do |floppy_drive|
|
18
|
+
VBox::Medium.new(floppy_drive)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def usb_devices
|
23
|
+
usb_devices = VBox::WebService.send_request(:i_host_get_usb_devices, _this)
|
24
|
+
usb_devices.to_a.map do |usb_device|
|
25
|
+
VBox::HostUSBDevice.new(usb_device)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def usb_devices_filters
|
30
|
+
usb_device_filters = VBox::WebService.send_request(:i_host_get_usb_device_filters, _this)
|
31
|
+
usb_device_filters.to_a.map do |usb_device_filter|
|
32
|
+
VBox::HostUSBDeviceFilter.new(usb_device_filter)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def network_interfaces
|
37
|
+
network_interfaces = VBox::WebService.send_request(:i_host_get_network_interfaces, _this)
|
38
|
+
network_interfaces.to_a.map do |network_interface|
|
39
|
+
VBox::HostNetworkInterface.new(network_interface)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def processor_count
|
44
|
+
VBox::WebService.send_request(:i_host_get_processor_count, _this)
|
45
|
+
end
|
46
|
+
|
47
|
+
def processor_online_count
|
48
|
+
VBox::WebService.send_request(:i_host_get_processor_online_count, _this)
|
49
|
+
end
|
50
|
+
|
51
|
+
def processor_core_count
|
52
|
+
VBox::WebService.send_request(:i_host_get_processor_core_count, _this)
|
53
|
+
end
|
54
|
+
|
55
|
+
def memory_size
|
56
|
+
VBox::WebService.send_request(:i_host_get_memory_size, _this)
|
57
|
+
end
|
58
|
+
|
59
|
+
def memory_available
|
60
|
+
VBox::WebService.send_request(:i_host_get_memory_available, _this)
|
61
|
+
end
|
62
|
+
|
63
|
+
def operating_system
|
64
|
+
VBox::WebService.send_request(:i_host_get_operating_system, _this)
|
65
|
+
end
|
66
|
+
|
67
|
+
def os_version
|
68
|
+
VBox::WebService.send_request(:i_host_get_os_version, _this)
|
69
|
+
end
|
70
|
+
|
71
|
+
def utc_time
|
72
|
+
VBox::WebService.send_request(:i_host_get_utc_time, _this)
|
73
|
+
end
|
74
|
+
|
75
|
+
def acceleration_3d_available
|
76
|
+
VBox::WebService.send_request(:i_host_get_acceleration_3d_available, _this)
|
77
|
+
end
|
78
|
+
|
79
|
+
# Methods
|
80
|
+
|
81
|
+
def create_host_only_network_interface
|
82
|
+
progress, host_only_network_interface = VBox::WebService.send_request(:i_host_create_host_only_network_interface,
|
83
|
+
_this)
|
84
|
+
[VBox::Progress.new(progress),
|
85
|
+
VBox::HostNetworkInterface.new(host_only_network_interface[:host_interface])]
|
86
|
+
end
|
87
|
+
|
88
|
+
def create_usb_device_filter(args={})
|
89
|
+
ensure_hash(args)
|
90
|
+
usb_device_filter = VBox::WebService.send_request(:i_host_create_usb_device_filter, _this.merge(args))
|
91
|
+
VBox::HostUSBDeviceFilter.new(usb_device_filter)
|
92
|
+
end
|
93
|
+
|
94
|
+
def find_host_dvd_drive(args={})
|
95
|
+
ensure_hash(args)
|
96
|
+
host_dvd_drive = VBox::WebService.send_request(:i_host_find_host_dvd_drive, _this.merge(args))
|
97
|
+
VBox::Medium.new(host_dvd_drive)
|
98
|
+
end
|
99
|
+
|
100
|
+
def find_host_floppy_drive(args={})
|
101
|
+
ensure_hash(args)
|
102
|
+
host_floppy_drive = VBox::WebService.send_request(:i_host_find_host_floppy_drive, _this.merge(args))
|
103
|
+
VBox::Medium.new(host_floppy_drive)
|
104
|
+
end
|
105
|
+
|
106
|
+
def find_host_network_interface_by_id(args={})
|
107
|
+
ensure_hash(args)
|
108
|
+
host_network_interface = VBox::WebService.send_request(:i_host_find_host_network_interface_by_id, _this.merge(args))
|
109
|
+
VBox::HostNetworkInterface.new(host_network_interface)
|
110
|
+
end
|
111
|
+
|
112
|
+
def find_host_network_interfaces_of_type(args={})
|
113
|
+
ensure_hash(args)
|
114
|
+
host_network_interfaces = VBox::WebService.send_request(:i_host_find_host_network_interfaces_of_type, _this.merge(args))
|
115
|
+
host_network_interfaces.map do |host_network_interface|
|
116
|
+
VBox::HostNetworkInterface.new(host_network_interface)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def find_usb_device_by_address(args={})
|
121
|
+
ensure_hash(args)
|
122
|
+
usb_device = VBox::WebService.send_request(:i_host_find_usb_device_by_address, _this.merge(args))
|
123
|
+
VBox::HostUSBDevice.new(usb_device)
|
124
|
+
end
|
125
|
+
|
126
|
+
def find_usb_device_by_id(args={})
|
127
|
+
ensure_hash(args)
|
128
|
+
usb_device = VBox::WebService.send_request(:i_host_find_usb_device_by_id, _this.merge(args))
|
129
|
+
VBox::HostUSBDevice.new(usb_device)
|
130
|
+
end
|
131
|
+
|
132
|
+
def generate_mac_address
|
133
|
+
VBox::WebService.send_request(:i_host_generate_mac_address, _this)
|
134
|
+
end
|
135
|
+
|
136
|
+
def get_processor_cpuid_leaf(args={})
|
137
|
+
ensure_hash(args)
|
138
|
+
VBox::WebService.send_request(:i_host_get_processor_cpuid_leaf, _this.merge(args))
|
139
|
+
end
|
140
|
+
|
141
|
+
def get_processor_description(args={})
|
142
|
+
ensure_hash(args)
|
143
|
+
VBox::WebService.send_request(:i_host_get_processor_description, _this.merge(args))
|
144
|
+
end
|
145
|
+
|
146
|
+
def get_processor_feature(args={})
|
147
|
+
ensure_hash(args)
|
148
|
+
VBox::WebService.send_request(:i_host_get_processor_feature, _this.merge(args))
|
149
|
+
end
|
150
|
+
|
151
|
+
def get_processor_speed(args={})
|
152
|
+
ensure_hash(args)
|
153
|
+
VBox::WebService.send_request(:i_host_get_processor_speed, _this.merge(args))
|
154
|
+
end
|
155
|
+
|
156
|
+
def insert_usb_device_filter(args={})
|
157
|
+
ensure_hash(args)
|
158
|
+
args[:filter] = args[:filter].ref if args.has_key?(:filter) & args[:filter].respond_to?(:ref)
|
159
|
+
VBox::WebService.send_request(:i_host_insert_usb_device_filter, _this.merge(args))
|
160
|
+
end
|
161
|
+
|
162
|
+
def remove_host_only_network_interface(args={})
|
163
|
+
ensure_hash(args)
|
164
|
+
VBox::WebService.send_request(:i_host_remove_host_only_network_interface, _this.merge(args))
|
165
|
+
end
|
166
|
+
|
167
|
+
def remove_usb_device_filter(args={})
|
168
|
+
ensure_hash(args)
|
169
|
+
VBox::WebService.send_request(:i_host_remove_usb_device_filter, _this.merge(args))
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|