code string | signature string | docstring string | loss_without_docstring float64 | loss_with_docstring float64 | factor float64 |
|---|---|---|---|---|---|
if not isinstance(cpu_id, baseinteger):
raise TypeError("cpu_id can only be an instance of type baseinteger")
(names, values) = self._call("getRegisters",
in_p=[cpu_id])
return (names, values) | def get_registers(self, cpu_id) | Gets all the registers for the given CPU.
in cpu_id of type int
The identifier of the Virtual CPU.
out names of type str
Array containing the lowercase register names.
out values of type str
Array parallel to the names holding the register values as if the
... | 7.504394 | 6.560372 | 1.143898 |
if not isinstance(cpu_id, baseinteger):
raise TypeError("cpu_id can only be an instance of type baseinteger")
if not isinstance(names, list):
raise TypeError("names can only be an instance of type list")
for a in names[:10]:
if not isinstance(a, bases... | def set_registers(self, cpu_id, names, values) | Sets zero or more registers atomically.
This feature is not implemented in the 4.0.0 release but may show up
in a dot release.
in cpu_id of type int
The identifier of the Virtual CPU.
in names of type str
Array containing the register names, case ignore... | 2.641606 | 2.512016 | 1.051588 |
if not isinstance(cpu_id, baseinteger):
raise TypeError("cpu_id can only be an instance of type baseinteger")
stack = self._call("dumpGuestStack",
in_p=[cpu_id])
return stack | def dump_guest_stack(self, cpu_id) | Produce a simple stack dump using the current guest state.
This feature is not implemented in the 4.0.0 release but may show up
in a dot release.
in cpu_id of type int
The identifier of the Virtual CPU.
return stack of type str
String containing the for... | 7.049387 | 7.721231 | 0.912987 |
if not isinstance(pattern, basestring):
raise TypeError("pattern can only be an instance of type basestring")
self._call("resetStats",
in_p=[pattern]) | def reset_stats(self, pattern) | Reset VM statistics.
in pattern of type str
The selection pattern. A bit similar to filename globbing. | 9.152279 | 8.992671 | 1.017749 |
if not isinstance(pattern, basestring):
raise TypeError("pattern can only be an instance of type basestring")
self._call("dumpStats",
in_p=[pattern]) | def dump_stats(self, pattern) | Dumps VM statistics.
in pattern of type str
The selection pattern. A bit similar to filename globbing. | 9.325785 | 10.149487 | 0.918843 |
if not isinstance(pattern, basestring):
raise TypeError("pattern can only be an instance of type basestring")
if not isinstance(with_descriptions, bool):
raise TypeError("with_descriptions can only be an instance of type bool")
stats = self._call("getStats",
... | def get_stats(self, pattern, with_descriptions) | Get the VM statistics in a XMLish format.
in pattern of type str
The selection pattern. A bit similar to filename globbing.
in with_descriptions of type bool
Whether to include the descriptions.
return stats of type str
The XML document containing the stati... | 3.671916 | 3.494251 | 1.050845 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
filter_p = self._call("createDeviceFilter",
in_p=[name])
filter_p = IUSBDeviceFilter(filter_p)
return filter_p | def create_device_filter(self, name) | Creates a new USB device filter. All attributes except
the filter name are set to empty (any match),
*active* is @c false (the filter is not active).
The created filter can then be added to the list of filters using
:py:func:`insert_device_filter` .
... | 6.008431 | 4.995214 | 1.202838 |
if not isinstance(position, baseinteger):
raise TypeError("position can only be an instance of type baseinteger")
if not isinstance(filter_p, IUSBDeviceFilter):
raise TypeError("filter_p can only be an instance of type IUSBDeviceFilter")
self._call("insertDeviceF... | def insert_device_filter(self, position, filter_p) | Inserts the given USB device to the specified position
in the list of filters.
Positions are numbered starting from 0. If the specified
position is equal to or greater than the number of elements in
the list, the filter is added to the end of the collection.
... | 4.125144 | 3.476203 | 1.186681 |
if not isinstance(machine, IMachine):
raise TypeError("machine can only be an instance of type IMachine")
if not isinstance(lock_type, LockType):
raise TypeError("lock_type can only be an instance of type LockType")
if not isinstance(token, IToken):
r... | def assign_machine(self, machine, lock_type, token) | Assigns the machine object associated with this direct-type
session or informs the session that it will be a remote one
(if @a machine == @c null).
in machine of type :class:`IMachine`
in lock_type of type :class:`LockType`
in token of type :class:`IToken`
raises :cla... | 2.779232 | 2.384159 | 1.165707 |
if not isinstance(machine, IMachine):
raise TypeError("machine can only be an instance of type IMachine")
if not isinstance(console, IConsole):
raise TypeError("console can only be an instance of type IConsole")
self._call("assignRemoteMachine",
... | def assign_remote_machine(self, machine, console) | Assigns the machine and the (remote) console object associated with
this remote-type session.
in machine of type :class:`IMachine`
in console of type :class:`IConsole`
raises :class:`VBoxErrorInvalidVmState`
Session state prevents operation. | 4.113686 | 3.43034 | 1.199207 |
if not isinstance(machine_state, MachineState):
raise TypeError("machine_state can only be an instance of type MachineState")
self._call("updateMachineState",
in_p=[machine_state]) | def update_machine_state(self, machine_state) | Updates the machine state in the VM process.
Must be called only in certain cases
(see the method implementation).
in machine_state of type :class:`MachineState`
raises :class:`VBoxErrorInvalidVmState`
Session state prevents operation.
raises :class:`VBoxEr... | 5.778573 | 5.926374 | 0.97506 |
if not isinstance(network_adapter, INetworkAdapter):
raise TypeError("network_adapter can only be an instance of type INetworkAdapter")
if not isinstance(change_adapter, bool):
raise TypeError("change_adapter can only be an instance of type bool")
self._call("onN... | def on_network_adapter_change(self, network_adapter, change_adapter) | Triggered when settings of a network adapter of the
associated virtual machine have changed.
in network_adapter of type :class:`INetworkAdapter`
in change_adapter of type bool
raises :class:`VBoxErrorInvalidVmState`
Session state prevents operation.
raises... | 3.303769 | 2.963066 | 1.114983 |
if not isinstance(audio_adapter, IAudioAdapter):
raise TypeError("audio_adapter can only be an instance of type IAudioAdapter")
self._call("onAudioAdapterChange",
in_p=[audio_adapter]) | def on_audio_adapter_change(self, audio_adapter) | Triggerd when settings of the audio adapter of the
associated virtual machine have changed.
in audio_adapter of type :class:`IAudioAdapter`
raises :class:`VBoxErrorInvalidVmState`
Session state prevents operation.
raises :class:`VBoxErrorInvalidObjectState`
... | 6.445276 | 6.312141 | 1.021092 |
if not isinstance(serial_port, ISerialPort):
raise TypeError("serial_port can only be an instance of type ISerialPort")
self._call("onSerialPortChange",
in_p=[serial_port]) | def on_serial_port_change(self, serial_port) | Triggered when settings of a serial port of the
associated virtual machine have changed.
in serial_port of type :class:`ISerialPort`
raises :class:`VBoxErrorInvalidVmState`
Session state prevents operation.
raises :class:`VBoxErrorInvalidObjectState`
Se... | 6.905099 | 6.166049 | 1.119858 |
if not isinstance(parallel_port, IParallelPort):
raise TypeError("parallel_port can only be an instance of type IParallelPort")
self._call("onParallelPortChange",
in_p=[parallel_port]) | def on_parallel_port_change(self, parallel_port) | Triggered when settings of a parallel port of the
associated virtual machine have changed.
in parallel_port of type :class:`IParallelPort`
raises :class:`VBoxErrorInvalidVmState`
Session state prevents operation.
raises :class:`VBoxErrorInvalidObjectState`
... | 6.286909 | 5.774242 | 1.088785 |
if not isinstance(medium_attachment, IMediumAttachment):
raise TypeError("medium_attachment can only be an instance of type IMediumAttachment")
if not isinstance(force, bool):
raise TypeError("force can only be an instance of type bool")
self._call("onMediumChang... | def on_medium_change(self, medium_attachment, force) | Triggered when attached media of the
associated virtual machine have changed.
in medium_attachment of type :class:`IMediumAttachment`
The medium attachment which changed.
in force of type bool
If the medium change was forced.
raises :class:`VBoxErrorInvalidVmSt... | 4.171331 | 3.480553 | 1.198468 |
if not isinstance(medium_attachment, IMediumAttachment):
raise TypeError("medium_attachment can only be an instance of type IMediumAttachment")
if not isinstance(remove, bool):
raise TypeError("remove can only be an instance of type bool")
if not isinstance(silen... | def on_storage_device_change(self, medium_attachment, remove, silent) | Triggered when attached storage devices of the
associated virtual machine have changed.
in medium_attachment of type :class:`IMediumAttachment`
The medium attachment which changed.
in remove of type bool
TRUE if the device is removed, FALSE if it was added.
in ... | 2.699901 | 2.509024 | 1.076076 |
if not isinstance(priority, VMProcPriority):
raise TypeError("priority can only be an instance of type VMProcPriority")
self._call("onVMProcessPriorityChange",
in_p=[priority]) | def on_vm_process_priority_change(self, priority) | Triggered when process priority of the
associated virtual machine have changed.
in priority of type :class:`VMProcPriority`
The priority which set.
raises :class:`VBoxErrorInvalidVmState`
Session state prevents operation.
raises :class:`VBoxErrorInvalid... | 8.137292 | 6.925447 | 1.174984 |
if not isinstance(clipboard_mode, ClipboardMode):
raise TypeError("clipboard_mode can only be an instance of type ClipboardMode")
self._call("onClipboardModeChange",
in_p=[clipboard_mode]) | def on_clipboard_mode_change(self, clipboard_mode) | Notification when the shared clipboard mode changes.
in clipboard_mode of type :class:`ClipboardMode`
The new shared clipboard mode. | 6.179416 | 5.830873 | 1.059775 |
if not isinstance(dnd_mode, DnDMode):
raise TypeError("dnd_mode can only be an instance of type DnDMode")
self._call("onDnDModeChange",
in_p=[dnd_mode]) | def on_dn_d_mode_change(self, dnd_mode) | Notification when the drag'n drop mode changes.
in dnd_mode of type :class:`DnDMode`
The new mode for drag'n drop. | 5.301147 | 4.711638 | 1.125118 |
if not isinstance(cpu, baseinteger):
raise TypeError("cpu can only be an instance of type baseinteger")
if not isinstance(add, bool):
raise TypeError("add can only be an instance of type bool")
self._call("onCPUChange",
in_p=[cpu, add]) | def on_cpu_change(self, cpu, add) | Notification when a CPU changes.
in cpu of type int
The CPU which changed
in add of type bool
Flag whether the CPU was added or removed | 5.004159 | 5.168535 | 0.968197 |
if not isinstance(execution_cap, baseinteger):
raise TypeError("execution_cap can only be an instance of type baseinteger")
self._call("onCPUExecutionCapChange",
in_p=[execution_cap]) | def on_cpu_execution_cap_change(self, execution_cap) | Notification when the CPU execution cap changes.
in execution_cap of type int
The new CPU execution cap value. (1-100) | 7.415506 | 8.003459 | 0.926538 |
if not isinstance(restart, bool):
raise TypeError("restart can only be an instance of type bool")
self._call("onVRDEServerChange",
in_p=[restart]) | def on_vrde_server_change(self, restart) | Triggered when settings of the VRDE server object of the
associated virtual machine have changed.
in restart of type bool
Flag whether the server must be restarted
raises :class:`VBoxErrorInvalidVmState`
Session state prevents operation.
raises :class:`... | 8.588963 | 9.17907 | 0.935712 |
if not isinstance(enable, bool):
raise TypeError("enable can only be an instance of type bool")
self._call("onRecordingChange",
in_p=[enable]) | def on_recording_change(self, enable) | Triggered when recording settings have changed.
in enable of type bool
TODO | 8.350096 | 9.908233 | 0.842743 |
if not isinstance(global_p, bool):
raise TypeError("global_p can only be an instance of type bool")
self._call("onSharedFolderChange",
in_p=[global_p]) | def on_shared_folder_change(self, global_p) | Triggered when a permanent (global or machine) shared folder has been
created or removed.
We don't pass shared folder parameters in this notification because
the order in which parallel notifications are delivered is not defined,
therefore it could happen that these parameters w... | 6.985478 | 6.689564 | 1.044235 |
if not isinstance(device, IUSBDevice):
raise TypeError("device can only be an instance of type IUSBDevice")
if not isinstance(error, IVirtualBoxErrorInfo):
raise TypeError("error can only be an instance of type IVirtualBoxErrorInfo")
if not isinstance(masked_inte... | def on_usb_device_attach(self, device, error, masked_interfaces, capture_filename) | Triggered when a request to capture a USB device (as a result
of matched USB filters or direct call to
:py:func:`IConsole.attach_usb_device` ) has completed.
A @c null @a error object means success, otherwise it
describes a failure.
in device of type :class:`IUSBDevice`
... | 2.703058 | 2.07131 | 1.304999 |
if not isinstance(id_p, basestring):
raise TypeError("id_p can only be an instance of type basestring")
if not isinstance(error, IVirtualBoxErrorInfo):
raise TypeError("error can only be an instance of type IVirtualBoxErrorInfo")
self._call("onUSBDeviceDetach",
... | def on_usb_device_detach(self, id_p, error) | Triggered when a request to release the USB device (as a result
of machine termination or direct call to
:py:func:`IConsole.detach_usb_device` ) has completed.
A @c null @a error object means success, otherwise it
describes a failure.
in id_p of type str
in error of typ... | 4.283456 | 3.141722 | 1.36341 |
if not isinstance(check, bool):
raise TypeError("check can only be an instance of type bool")
(can_show, win_id) = self._call("onShowWindow",
in_p=[check])
return (can_show, win_id) | def on_show_window(self, check) | Called by :py:func:`IMachine.can_show_console_window` and by
:py:func:`IMachine.show_console_window` in order to notify
console listeners
:py:class:`ICanShowWindowEvent`
and :py:class:`IShowWindowEvent` .
in check of type bool
out can_show of type bool
out w... | 7.475301 | 5.525782 | 1.352804 |
if not isinstance(bandwidth_group, IBandwidthGroup):
raise TypeError("bandwidth_group can only be an instance of type IBandwidthGroup")
self._call("onBandwidthGroupChange",
in_p=[bandwidth_group]) | def on_bandwidth_group_change(self, bandwidth_group) | Notification when one of the bandwidth groups change.
in bandwidth_group of type :class:`IBandwidthGroup`
The bandwidth group which changed. | 6.971654 | 5.531344 | 1.260391 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
if not isinstance(value, basestring):
raise TypeError("value can only be an instance of type basestring")
if not isinstance(flags, basestring):
rai... | def access_guest_property(self, name, value, flags, access_mode) | Called by :py:func:`IMachine.get_guest_property` and by
:py:func:`IMachine.set_guest_property` in order to read and
modify guest properties.
in name of type str
in value of type str
in flags of type str
in access_mode of type int
0 = get, 1 = set, 2 = de... | 2.455031 | 1.959321 | 1.253001 |
if not isinstance(medium_attachment, IMediumAttachment):
raise TypeError("medium_attachment can only be an instance of type IMediumAttachment")
if not isinstance(source_idx, baseinteger):
raise TypeError("source_idx can only be an instance of type baseinteger")
i... | def online_merge_medium(self, medium_attachment, source_idx, target_idx, progress) | Triggers online merging of a hard disk. Used internally when deleting
a snapshot while a VM referring to the same hard disk chain is running.
in medium_attachment of type :class:`IMediumAttachment`
The medium attachment to identify the medium chain.
in source_idx of type int
... | 2.323439 | 2.058733 | 1.128577 |
if not isinstance(attachments, list):
raise TypeError("attachments can only be an instance of type list")
for a in attachments[:10]:
if not isinstance(a, IMediumAttachment):
raise TypeError(
"array can only contain objects of type ... | def reconfigure_medium_attachments(self, attachments) | Reconfigure all specified medium attachments in one go, making sure
the current state corresponds to the specified medium.
in attachments of type :class:`IMediumAttachment`
Array containing the medium attachments which need to be
reconfigured.
raises :class:`VBoxErrorIn... | 5.919537 | 4.909245 | 1.205794 |
if not isinstance(enable, bool):
raise TypeError("enable can only be an instance of type bool")
self._call("enableVMMStatistics",
in_p=[enable]) | def enable_vmm_statistics(self, enable) | Enables or disables collection of VMM RAM statistics.
in enable of type bool
True enables statistics collection.
raises :class:`VBoxErrorInvalidVmState`
Machine session is not open.
raises :class:`VBoxErrorInvalidObjectState`
Session type is not dir... | 7.90287 | 8.603712 | 0.918542 |
if not isinstance(reason, Reason):
raise TypeError("reason can only be an instance of type Reason")
self._call("pauseWithReason",
in_p=[reason]) | def pause_with_reason(self, reason) | Internal method for triggering a VM pause with a specified reason code.
The reason code can be interpreted by device/drivers and thus it might
behave slightly differently than a normal VM pause.
:py:func:`IConsole.pause`
in reason of type :class:`Reason`
S... | 10.896224 | 9.985553 | 1.091199 |
if not isinstance(reason, Reason):
raise TypeError("reason can only be an instance of type Reason")
self._call("resumeWithReason",
in_p=[reason]) | def resume_with_reason(self, reason) | Internal method for triggering a VM resume with a specified reason code.
The reason code can be interpreted by device/drivers and thus it might
behave slightly differently than a normal VM resume.
:py:func:`IConsole.resume`
in reason of type :class:`Reason`
... | 10.644658 | 9.831391 | 1.082721 |
if not isinstance(reason, Reason):
raise TypeError("reason can only be an instance of type Reason")
if not isinstance(progress, IProgress):
raise TypeError("progress can only be an instance of type IProgress")
if not isinstance(snapshot, ISnapshot):
r... | def save_state_with_reason(self, reason, progress, snapshot, state_file_path, pause_vm) | Internal method for triggering a VM save state with a specified reason
code. The reason code can be interpreted by device/drivers and thus it
might behave slightly differently than a normal VM save state.
This call is fully synchronous, and the caller is expected to have set
the... | 2.318989 | 1.884595 | 1.230497 |
if not isinstance(metric_names, list):
raise TypeError("metric_names can only be an instance of type list")
for a in metric_names[:10]:
if not isinstance(a, basestring):
raise TypeError(
"array can only contain objects of type base... | def get_metrics(self, metric_names, objects) | Returns parameters of specified metrics for a set of objects.
@c Null metrics array means all metrics. @c Null object array means
all existing objects.
in metric_names of type str
Metric name filter. Currently, only a comma-separated list of metrics
is supported... | 3.391381 | 2.703625 | 1.254383 |
if not isinstance(metric_names, list):
raise TypeError("metric_names can only be an instance of type list")
for a in metric_names[:10]:
if not isinstance(a, basestring):
raise TypeError(
"array can only contain objects of type base... | def setup_metrics(self, metric_names, objects, period, count) | Sets parameters of specified base metrics for a set of objects. Returns
an array of :py:class:`IPerformanceMetric` describing the metrics
have been affected.
@c Null or empty metric name array means all metrics. @c Null or
empty object array means all existing objects. If metri... | 2.718333 | 2.234655 | 1.216444 |
if not isinstance(metric_names, list):
raise TypeError("metric_names can only be an instance of type list")
for a in metric_names[:10]:
if not isinstance(a, basestring):
raise TypeError(
"array can only contain objects of type base... | def enable_metrics(self, metric_names, objects) | Turns on collecting specified base metrics. Returns an array of
:py:class:`IPerformanceMetric` describing the metrics have been
affected.
@c Null or empty metric name array means all metrics. @c Null or
empty object array means all existing objects. If metric name array
... | 3.425322 | 2.676142 | 1.279948 |
if not isinstance(metric_names, list):
raise TypeError("metric_names can only be an instance of type list")
for a in metric_names[:10]:
if not isinstance(a, basestring):
raise TypeError(
"array can only contain objects of type base... | def query_metrics_data(self, metric_names, objects) | Queries collected metrics data for a set of objects.
The data itself and related metric information are returned in seven
parallel and one flattened array of arrays. Elements of
returnMetricNames, returnObjects, returnUnits, returnScales,
returnSequenceNumbers, returnDataIndices... | 2.782573 | 2.174749 | 1.279492 |
if not isinstance(mtu, baseinteger):
raise TypeError("mtu can only be an instance of type baseinteger")
if not isinstance(sock_snd, baseinteger):
raise TypeError("sock_snd can only be an instance of type baseinteger")
if not isinstance(sock_rcv, baseinteger):
... | def set_network_settings(self, mtu, sock_snd, sock_rcv, tcp_wnd_snd, tcp_wnd_rcv) | Sets network configuration of the NAT engine.
in mtu of type int
MTU (maximum transmission unit) of the NAT engine in bytes.
in sock_snd of type int
Capacity of the socket send buffer in bytes when creating a new socket.
in sock_rcv of type int
Capacity of ... | 1.620659 | 1.700696 | 0.952939 |
(mtu, sock_snd, sock_rcv, tcp_wnd_snd, tcp_wnd_rcv) = self._call("getNetworkSettings")
return (mtu, sock_snd, sock_rcv, tcp_wnd_snd, tcp_wnd_rcv) | def get_network_settings(self) | Returns network configuration of NAT engine. See :py:func:`set_network_settings`
for parameter descriptions.
out mtu of type int
out sock_snd of type int
out sock_rcv of type int
out tcp_wnd_snd of type int
out tcp_wnd_rcv of type int | 4.30825 | 2.273069 | 1.895345 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
if not isinstance(proto, NATProtocol):
raise TypeError("proto can only be an instance of type NATProtocol")
if not isinstance(host_ip, basestring):
... | def add_redirect(self, name, proto, host_ip, host_port, guest_ip, guest_port) | Adds a new NAT port-forwarding rule.
in name of type str
The name of the rule. An empty name is acceptable, in which case the NAT engine
auto-generates one using the other parameters.
in proto of type :class:`NATProtocol`
Protocol handled with the rule.
in ... | 1.7782 | 1.739942 | 1.021988 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
self._call("removeRedirect",
in_p=[name]) | def remove_redirect(self, name) | Removes a port-forwarding rule that was previously registered.
in name of type str
The name of the rule to delete. | 8.510979 | 10.111467 | 0.841715 |
if not isinstance(preferred_locale, basestring):
raise TypeError("preferred_locale can only be an instance of type basestring")
if not isinstance(preferred_language, basestring):
raise TypeError("preferred_language can only be an instance of type basestring")
if ... | def query_license(self, preferred_locale, preferred_language, format_p) | Full feature version of the license attribute.
in preferred_locale of type str
The preferred license locale. Pass an empty string to get the default
license.
in preferred_language of type str
The preferred license language. Pass an empty string to get the
... | 2.150648 | 2.176275 | 0.988225 |
if not isinstance(obj_uuid, basestring):
raise TypeError("obj_uuid can only be an instance of type basestring")
return_interface = self._call("queryObject",
in_p=[obj_uuid])
return_interface = Interface(return_interface)
return return_interface | def query_object(self, obj_uuid) | Queries the IUnknown interface to an object in the extension pack
main module. This allows plug-ins and others to talk directly to an
extension pack.
in obj_uuid of type str
The object ID. What exactly this is
return return_interface of type Interface
The querie... | 5.934057 | 4.690456 | 1.265134 |
if not isinstance(replace, bool):
raise TypeError("replace can only be an instance of type bool")
if not isinstance(display_info, basestring):
raise TypeError("display_info can only be an instance of type basestring")
progess = self._call("install",
... | def install(self, replace, display_info) | Install the extension pack.
in replace of type bool
Set this to automatically uninstall any existing extension pack with
the same name as the one being installed.
in display_info of type str
Platform specific display information. Reserved for future hacks.
... | 4.08951 | 3.420887 | 1.195453 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
return_data = self._call("find",
in_p=[name])
return_data = IExtPack(return_data)
return return_data | def find(self, name) | Returns the extension pack with the specified name if found.
in name of type str
The name of the extension pack to locate.
return return_data of type :class:`IExtPack`
The extension pack if found.
raises :class:`VBoxErrorObjectNotFound`
No extension pack ma... | 8.331878 | 5.105329 | 1.631996 |
if not isinstance(path, basestring):
raise TypeError("path can only be an instance of type basestring")
file_p = self._call("openExtPackFile",
in_p=[path])
file_p = IExtPackFile(file_p)
return file_p | def open_ext_pack_file(self, path) | Attempts to open an extension pack file in preparation for
installation.
in path of type str
The path of the extension pack tarball. This can optionally be
followed by a "::SHA-256=hex-digit" of the tarball.
return file_p of type :class:`IExtPackFile`
The in... | 6.036932 | 4.584339 | 1.31686 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
if not isinstance(forced_removal, bool):
raise TypeError("forced_removal can only be an instance of type bool")
if not isinstance(display_info, basestring):
... | def uninstall(self, name, forced_removal, display_info) | Uninstalls an extension pack, removing all related files.
in name of type str
The name of the extension pack to uninstall.
in forced_removal of type bool
Forced removal of the extension pack. This means that the uninstall
hook will not be called.
in display... | 2.789543 | 2.44135 | 1.142623 |
if not isinstance(frontend_name, basestring):
raise TypeError("frontend_name can only be an instance of type basestring")
plug_in_modules = self._call("queryAllPlugInsForFrontend",
in_p=[frontend_name])
return plug_in_modules | def query_all_plug_ins_for_frontend(self, frontend_name) | Gets the path to all the plug-in modules for a given frontend.
This is a convenience method that is intended to simplify the plug-in
loading process for a frontend.
in frontend_name of type str
The name of the frontend or component.
return plug_in_modules of type s... | 5.562403 | 4.921567 | 1.13021 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
usable = self._call("isExtPackUsable",
in_p=[name])
return usable | def is_ext_pack_usable(self, name) | Check if the given extension pack is loaded and usable.
in name of type str
The name of the extension pack to check for.
return usable of type bool
Is the given extension pack loaded and usable. | 7.523195 | 8.717839 | 0.862966 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
if not isinstance(type_p, BandwidthGroupType):
raise TypeError("type_p can only be an instance of type BandwidthGroupType")
if not isinstance(max_bytes_per_sec... | def create_bandwidth_group(self, name, type_p, max_bytes_per_sec) | Creates a new bandwidth group.
in name of type str
Name of the bandwidth group.
in type_p of type :class:`BandwidthGroupType`
The type of the bandwidth group (network or disk).
in max_bytes_per_sec of type int
The maximum number of bytes which can be transf... | 2.258704 | 2.248468 | 1.004552 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
self._call("deleteBandwidthGroup",
in_p=[name]) | def delete_bandwidth_group(self, name) | Deletes a new bandwidth group.
in name of type str
Name of the bandwidth group to delete. | 8.50566 | 9.667548 | 0.879816 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
bandwidth_group = self._call("getBandwidthGroup",
in_p=[name])
bandwidth_group = IBandwidthGroup(bandwidth_group)
return bandwidth_group | def get_bandwidth_group(self, name) | Get a bandwidth group by name.
in name of type str
Name of the bandwidth group to get.
return bandwidth_group of type :class:`IBandwidthGroup`
Where to store the bandwidth group on success. | 5.452184 | 4.350946 | 1.253103 |
bandwidth_groups = self._call("getAllBandwidthGroups")
bandwidth_groups = [IBandwidthGroup(a) for a in bandwidth_groups]
return bandwidth_groups | def get_all_bandwidth_groups(self) | Get all managed bandwidth groups.
return bandwidth_groups of type :class:`IBandwidthGroup`
The array of managed bandwidth groups. | 5.13321 | 4.544017 | 1.129664 |
if not isinstance(machine, IMachine):
raise TypeError("machine can only be an instance of type IMachine")
self._call("checkMachineError",
in_p=[machine]) | def check_machine_error(self, machine) | Perform error checking before using an :py:class:`IMachine` object.
Generally useful before starting a VM and all other uses. If anything
is not as it should be then this method will return an appropriate
error.
in machine of type :class:`IMachine`
The machine object to che... | 9.276502 | 8.395818 | 1.104896 |
if not isinstance(subordinates, list):
raise TypeError("subordinates can only be an instance of type list")
for a in subordinates[:10]:
if not isinstance(a, IEventSource):
raise TypeError(
"array can only contain objects of type IE... | def create_aggregator(self, subordinates) | Creates an aggregator event source, collecting events from multiple sources.
This way a single listener can listen for events coming from multiple sources,
using a single blocking :py:func:`get_event` on the returned aggregator.
in subordinates of type :class:`IEventSource`
Subordi... | 5.732461 | 4.656369 | 1.231101 |
if not isinstance(listener, IEventListener):
raise TypeError("listener can only be an instance of type IEventListener")
if not isinstance(interesting, list):
raise TypeError("interesting can only be an instance of type list")
for a in interesting[:10]:
... | def register_listener(self, listener, interesting, active) | Register an event listener.
To avoid system overload, the VirtualBox server process checks if passive event
listeners call :py:func:`IEventSource.get_event` frequently enough. In the
current implementation, if more than 500 pending events are detected for a passive
eve... | 3.900439 | 2.968422 | 1.313977 |
if not isinstance(listener, IEventListener):
raise TypeError("listener can only be an instance of type IEventListener")
self._call("unregisterListener",
in_p=[listener]) | def unregister_listener(self, listener) | Unregister an event listener. If listener is passive, and some waitable events are still
in queue they are marked as processed automatically.
in listener of type :class:`IEventListener`
Listener to unregister. | 9.990975 | 9.68681 | 1.0314 |
if not isinstance(event, IEvent):
raise TypeError("event can only be an instance of type IEvent")
if not isinstance(timeout, baseinteger):
raise TypeError("timeout can only be an instance of type baseinteger")
result = self._call("fireEvent",
... | def fire_event(self, event, timeout) | Fire an event for this source.
in event of type :class:`IEvent`
Event to deliver.
in timeout of type int
Maximum time to wait for event processing (if event is waitable), in ms;
0 = no wait, -1 = indefinite wait.
return result of type bool
true ... | 4.809033 | 4.187251 | 1.148494 |
if not isinstance(listener, IEventListener):
raise TypeError("listener can only be an instance of type IEventListener")
if not isinstance(timeout, baseinteger):
raise TypeError("timeout can only be an instance of type baseinteger")
event = self._call("getEvent",
... | def get_event(self, listener, timeout) | Get events from this peer's event queue (for passive mode). Calling this method
regularly is required for passive event listeners to avoid system overload;
see :py:func:`IEventSource.register_listener` for details.
in listener of type :class:`IEventListener`
Which listener to get d... | 4.597459 | 4.163747 | 1.104164 |
if not isinstance(listener, IEventListener):
raise TypeError("listener can only be an instance of type IEventListener")
if not isinstance(event, IEvent):
raise TypeError("event can only be an instance of type IEvent")
self._call("eventProcessed",
... | def event_processed(self, listener, event) | Must be called for waitable events after a particular listener finished its
event processing. When all listeners of a particular event have called this
method, the system will then call :py:func:`IEvent.set_processed` .
in listener of type :class:`IEventListener`
Which listener proc... | 4.648244 | 4.183479 | 1.111095 |
if not isinstance(event, IEvent):
raise TypeError("event can only be an instance of type IEvent")
self._call("handleEvent",
in_p=[event]) | def handle_event(self, event) | Handle event callback for active listeners. It is not called for
passive listeners. After calling :py:func:`handle_event` on all active listeners
and having received acknowledgement from all passive listeners via
:py:func:`IEventSource.event_processed` , the event is marked as
processed... | 11.769437 | 12.350327 | 0.952966 |
if not isinstance(timeout, baseinteger):
raise TypeError("timeout can only be an instance of type baseinteger")
result = self._call("waitProcessed",
in_p=[timeout])
return result | def wait_processed(self, timeout) | Wait until time outs, or this event is processed. Event must be waitable for this operation to have
described semantics, for non-waitable returns true immediately.
in timeout of type int
Maximum time to wait for event processing, in ms;
0 = no wait, -1 = indefinite wait.
... | 8.433601 | 9.172861 | 0.919408 |
if not isinstance(reason, basestring):
raise TypeError("reason can only be an instance of type basestring")
self._call("addVeto",
in_p=[reason]) | def add_veto(self, reason) | Adds a veto on this event.
in reason of type str
Reason for veto, could be null or empty string. | 8.838709 | 9.574536 | 0.923147 |
if not isinstance(reason, basestring):
raise TypeError("reason can only be an instance of type basestring")
self._call("addApproval",
in_p=[reason]) | def add_approval(self, reason) | Adds an approval on this event.
in reason of type str
Reason for approval, could be null or empty string. | 8.697867 | 9.780492 | 0.889308 |
if not isinstance(description, IVirtualSystemDescription):
raise TypeError("description can only be an instance of type IVirtualSystemDescription")
if not isinstance(progress, IProgress):
raise TypeError("progress can only be an instance of type IProgress")
if no... | def export_launch_vm(self, description, progress, virtual_box) | Exports and optionally launch a VM described in description parameter
in description of type :class:`IVirtualSystemDescription`
VirtualSystemDescription object which is describing a machine and all required parameters.
in progress of type :class:`IProgress`
Progress object to t... | 2.671141 | 2.283732 | 1.169639 |
(progress, form) = self._call("getExportLaunchDescriptionForm")
progress = IProgress(progress)
form = IVirtualSystemDescriptionForm(form)
return (progress, form) | def get_export_launch_description_form(self) | Returns a form for editing the virtual system description.
Since the data for the form are fetched from the cloud a
progress object is also returned to indicate if/when the form
is ready to be used.
out form of type :class:`IVirtualSystemDescriptionForm`
An IForm instance fo... | 10.289737 | 3.795046 | 2.71136 |
if not isinstance(machine_state, CloudMachineState):
raise TypeError("machine_state can only be an instance of type CloudMachineState")
(return_ids, return_names) = self._call("listInstances",
in_p=[machine_state])
return (return_ids, return_names) | def list_instances(self, machine_state) | Returns the list of the instances in the Cloud.
in machine_state of type :class:`CloudMachineState`
out return_names of type str
VM names.
return return_ids of type str
VM ids. | 5.525056 | 4.070104 | 1.357473 |
if not isinstance(image_state, CloudImageState):
raise TypeError("image_state can only be an instance of type CloudImageState")
(return_ids, return_names) = self._call("listImages",
in_p=[image_state])
return (return_ids, return_names) | def list_images(self, image_state) | Returns the list of the images in the Cloud.
in image_state of type :class:`CloudImageState`
out return_names of type str
Images names.
return return_ids of type str
Images ids. | 5.439991 | 4.072142 | 1.335904 |
if not isinstance(name, basestring):
raise TypeError("name can only be an instance of type basestring")
description = self._call("getPropertyDescription",
in_p=[name])
return description | def get_property_description(self, name) | Property name.
in name of type str
Property name.
return description of type str
Property description. | 7.56454 | 7.96172 | 0.950114 |
if not isinstance(profile_name, basestring):
raise TypeError("profile_name can only be an instance of type basestring")
if not isinstance(names, list):
raise TypeError("names can only be an instance of type list")
for a in names[:10]:
if not isinstanc... | def create_profile(self, profile_name, names, values) | Creates a new profile.
in profile_name of type str
The profile name. Must not exist, otherwise an error is raised.
in names of type str
Names of properties.
in values of type str
Values of set properties. | 2.38767 | 2.43457 | 0.980736 |
event_type = library.VBoxEventType.on_guest_mouse
return self.event_source.register_callback(callback, event_type) | def register_on_guest_mouse(self, callback) | Set the callback function to consume on guest mouse events.
Callback receives a IGuestMouseEvent object.
Example:
def callback(event):
print(("%s %s %s" % (event.x, event.y, event.z)) | 8.020108 | 8.462642 | 0.947707 |
if press_keys is None:
press_keys = []
if hold_keys is None:
hold_keys = []
release_codes = set()
put_codes = set()
try:
# hold the keys
for k in hold_keys:
put, release = self.SCANCODES[k]
... | def put_keys(self, press_keys=None, hold_keys=None, press_delay=50) | Put scancodes that represent keys defined in the sequences provided.
Arguments:
press_keys: Press a sequence of keys
hold_keys: While pressing the sequence of keys, hold down the keys
defined in hold_keys.
press_delay: Number of milliseconds to delay bet... | 2.717236 | 2.645375 | 1.027164 |
return self.event_source.register_callback(callback,
library.VBoxEventType.on_guest_keyboard) | def register_on_guest_keyboard(self, callback) | Set the callback function to consume on guest keyboard events
Callback receives a IGuestKeyboardEvent object.
Example:
def callback(event):
print(event.scancodes) | 14.313992 | 15.969199 | 0.89635 |
if arguments is None:
arguments = []
if environment is None:
environment = []
if flags is None:
flags = [library.ProcessCreateFlag.wait_for_std_err,
library.ProcessCreateFlag.wait_for_std_out,
library.ProcessC... | def execute(self, command, arguments=None, stdin="", environment=None,
flags=None, priority=library.ProcessPriority.default,
affinity=None, timeout_ms=0) | Execute a command in the Guest
Arguments:
command - Command to execute.
arguments - List of arguments for the command
stdin - A buffer to write to the stdin of the command.
environment - See IGuestSession.create_process?
flags ... | 2.624677 | 2.416537 | 1.086132 |
"Super-mkdir: create a leaf directory and all intermediate ones."
self.directory_create(path, mode, [library.DirectoryCreateFlag.parents]) | def makedirs(self, path, mode=0x777) | Super-mkdir: create a leaf directory and all intermediate ones. | 23.195076 | 11.506404 | 2.015841 |
"test if path exists"
return (
self.file_exists(path, follow_symlinks)
or self.symlink_exists(path, follow_symlinks)
or self.directory_exists(path, follow_symlinks)
) | def path_exists(self, path, follow_symlinks=True) | test if path exists | 2.912001 | 2.582 | 1.127808 |
"Read and interpret ova file into this Appliance object."
p = super(IAppliance, self).read(ova_path)
p.wait_for_completion()
self.interpret()
warnings = self.get_warnings()
if warnings:
warning = Warning("\n".join(warnings))
warning.warnings = warn... | def read(self, ova_path) | Read and interpret ova file into this Appliance object. | 7.258038 | 5.656358 | 1.283165 |
"Find a description for the given appliance name."
for desc in self.virtual_system_descriptions:
values = desc.get_values_by_type(DescType.name,
DescValueType.original)
if name in values:
break
else:
... | def find_description(self, name) | Find a description for the given appliance name. | 7.568923 | 6.08031 | 1.244825 |
"Return the vbox config major, minor, build"
with open(config_kmk, 'rb') as f:
config = f.read()
major = b"6"#re.search(b"VBOX_VERSION_MAJOR = (?P<major>[\d])", config).groupdict()['major']
minor = b"0"#re.search(b"VBOX_VERSION_MINOR = (?P<minor>[\d])", config).groupdict()['minor']
build = b... | def get_vbox_version(config_kmk) | Return the vbox config major, minor, build | 2.5914 | 2.242048 | 1.155818 |
event_type = library.VBoxEventType.on_machine_state_changed
return self.event_source.register_callback(callback, event_type) | def register_on_machine_state_changed(self, callback) | Set the callback function to consume on machine state changed events.
Callback receives a IMachineStateChangedEvent object.
Returns the callback_id | 7.219201 | 10.19423 | 0.708165 |
event_type = library.VBoxEventType.on_machine_data_changed
return self.event_source.register_callback(callback, event_type) | def register_on_machine_data_changed(self, callback) | Set the callback function to consume on machine data changed events.
Callback receives a IMachineDataChangedEvent object.
Returns the callback_id | 7.25638 | 10.298025 | 0.704638 |
event_type = library.VBoxEventType.on_machine_registered
return self.event_source.register_callback(callback, event_type) | def register_on_machine_registered(self, callback) | Set the callback function to consume on machine registered events.
Callback receives a IMachineRegisteredEvent object.
Returns the callback_id | 7.904788 | 10.681351 | 0.740055 |
event_type = library.VBoxEventType.on_snapshot_deleted
return self.event_source.register_callback(callback, event_type) | def register_on_snapshot_deleted(self, callback) | Set the callback function to consume on snapshot deleted events.
Callback receives a ISnapshotDeletedEvent object.
Returns the callback_id | 8.109907 | 10.789971 | 0.751615 |
event_type = library.VBoxEventType.on_snapshot_taken
return self.event_source.register_callback(callback, event_type) | def register_on_snapshot_taken(self, callback) | Set the callback function to consume on snapshot taken events.
Callback receives a ISnapshotTakenEvent object.
Returns the callback_id | 8.679247 | 11.803113 | 0.735335 |
event_type = library.VBoxEventType.on_snapshot_changed
return self.event_source.register_callback(callback, event_type) | def register_on_snapshot_changed(self, callback) | Set the callback function to consume on snapshot changed events
which occur when snapshot properties have been changed.
Callback receives a ISnapshotChangedEvent object.
Returns the callback_id | 8.33673 | 11.568459 | 0.720643 |
event_type = library.VBoxEventType.on_guest_property_changed
return self.event_source.register_callback(callback, event_type) | def register_on_guest_property_changed(self, callback) | Set the callback function to consume on guest property changed
events.
Callback receives a IGuestPropertyChangedEvent object.
Returns the callback_id | 7.008582 | 9.174121 | 0.763951 |
event_type = library.VBoxEventType.on_session_state_changed
return self.event_source.register_callback(callback, event_type) | def register_on_session_state_changed(self, callback) | Set the callback function to consume on session state changed
events.
Callback receives a ISessionStateChangedEvent object.
Returns the callback_id | 7.990856 | 11.17739 | 0.714913 |
event_type = library.VBoxEventType.on_extra_data_changed
return self.event_source.register_callback(callback, event_type) | def register_on_extra_data_changed(self, callback) | Set the callback function to consume on extra data changed
events.
Callback receives a IExtraDataChangedEvent object.
Returns the callback_id | 8.076133 | 10.53511 | 0.766592 |
event_type = library.VBoxEventType.on_extra_data_can_change
return self.event_source.register_callback(callback, event_type) | def register_on_extra_data_can_change(self, callback) | Set the callback function to consume on extra data changed
events.
Callback receives a IExtraDataCanChangeEvent object.
Returns the callback_id | 7.586306 | 9.915065 | 0.765129 |
global _lookup
if not isinstance(event_type, library.VBoxEventType):
raise TypeError("event_type was not of VBoxEventType")
if not _lookup:
for attr in dir(library):
event_interface = getattr(library, attr)
if not inspect.isclass(event_interface):
... | def type_to_interface(event_type) | Return the event interface object that corresponds to the event type
enumeration | 2.92863 | 2.838378 | 1.031797 |
global _callbacks
event_interface = type_to_interface(event_type)
listener = event_source.create_listener()
event_source.register_listener(listener, [event_type], False)
quit = threading.Event()
t = threading.Thread(target=_event_monitor, args=(callback,
... | def register_callback(callback, event_source, event_type) | register a callback function against an event_source for a given
event_type.
Arguments:
callback - function to call when the event occurs
event_source - the source to monitor events in
event_type - the type of event we're monitoring for
returns the registration id (callback_id) | 3.703318 | 4.297397 | 0.861758 |
global _callbacks
obj = _callbacks.pop(callback_id, None)
threads = []
if obj is not None:
t, quit = obj
quit.set()
threads.append(t)
for t in threads:
t.join() | def unregister_callback(callback_id) | unregister a callback registration | 3.859126 | 3.821728 | 1.009786 |
if self.state >= library.MachineState.running:
session = virtualbox.Session()
self.lock_machine(session, library.LockType.shared)
try:
progress = session.console.power_down()
progress.wait_for_completion(-1)
except Exceptio... | def remove(self, delete=True) | Unregister and optionally delete associated config
Options:
delete - remove all elements of this VM from the system
Return the IMedia from unregistered VM | 6.426798 | 6.031054 | 1.065618 |
if options is None:
options = [library.CloneOptions.link]
if groups is None:
groups = []
vbox = virtualbox.VirtualBox()
if snapshot_name_or_id is not None:
if isinstance(snapshot_name_or_id, basestring):
snapshot = self.find_... | def clone(self, snapshot_name_or_id=None,
mode=library.CloneMode.machine_state,
options=None, name=None,
uuid=None, groups=None, basefolder='', register=True) | Clone this Machine
Options:
snapshot_name_or_id - value can be either ISnapshot, name, or id
mode - set the CloneMode value
options - define the CloneOptions options
name - define a name of the new VM
uuid - set the uuid of the new VM
grou... | 3.083596 | 3.078791 | 1.001561 |
if session is None:
session = library.ISession()
# NOTE: The following hack handles the issue of unknown machine state.
# This occurs most frequently when a machine is powered off and
# in spite waiting for the completion event to end, the state of
... | def create_session(self, lock_type=library.LockType.shared,
session=None) | Lock this machine
Arguments:
lock_type - see IMachine.lock_machine for details
session - optionally define a session object to lock this machine
against. If not defined, a new ISession object is
created to lock against
return an ISes... | 8.359155 | 8.357784 | 1.000164 |
types, _, _, vbox_values, extra_config = self.get_description()
# find offset to description type
for offset, t in enumerate(types):
if t == description_type:
break
else:
raise Exception("Failed to find type for %s" % description_type)
... | def set_final_value(self, description_type, value) | Set the value for the given description type.
in description_type type :class:`VirtualSystemDescriptionType`
in value type str | 3.544551 | 3.636223 | 0.974789 |
chained = asyncio.Future(loop=loop)
def copy(_future):
if _future.exception() is not None:
chained.set_exception(_future.exception())
else:
chained.set_result(return_value)
future._future.add_done_callback(functools.partial(loop.add_callback, copy))
return ... | def chain_return_value(future, loop, return_value) | Compatible way to return a value in all Pythons.
PEP 479, raise StopIteration(value) from a coroutine won't work forever,
but "return value" doesn't work in Python 2. Instead, Motor methods that
return values resolve a Future with it, and are implemented with callbacks
rather than a coroutine internall... | 3.131789 | 3.597808 | 0.870472 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.