Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit 2561fd4

Browse files
authored
Release 2.1.0
1 parent ffde6cb commit 2561fd4

File tree

6 files changed

+199
-28
lines changed

6 files changed

+199
-28
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
2.1.0 (10/25/2020)
5+
----------------
6+
7+
* Added support for VirtualBox 6.1
8+
49
2.0.0 (4/2/2019)
510
----------------
611

MANIFEST.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ include *.rst
33
include *.txt
44
include *.py
55
include LICENSE
6-
include build_docs.py
7-
include docs/Makefile
8-
include docs/make.bat
96
recursive-include docs *.rst *.py
107
recursive-include tests *.py *.conf
118
recursive-include tests/fixtures *.ova

build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def to_string(value):
2626

2727

2828
LIB_IMPORTS = """\
29-
# Complete implementation of VirtualBox's COM API with a Pythoninc interface.
29+
# Complete implementation of VirtualBox's COM API with a Pythonic interface.
3030
#
3131
# Note: Commenting, and API structure generation was carved from
3232
# VirtualBox project's VirtualBox.xidl Main API definition.
@@ -678,7 +678,7 @@ def get_vbox_version(config_kmk):
678678
config = f.read()
679679
major = b"6" # re.search(b"VBOX_VERSION_MAJOR = (?P<major>[\d])", config).groupdict()['major']
680680
minor = b"1" # re.search(b"VBOX_VERSION_MINOR = (?P<minor>[\d])", config).groupdict()['minor']
681-
build = b"14" # re.search(b"VBOX_VERSION_BUILD = (?P<build>[\d])", config).groupdict()['build']
681+
build = b"16" # re.search(b"VBOX_VERSION_BUILD = (?P<build>[\d])", config).groupdict()['build']
682682
return b".".join([major, minor, build])
683683

684684

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
maintainer=about["__maintainer__"],
1919
maintainer_email=about["__maintainer_email__"],
2020
url=about["__url__"],
21-
description="Complete implementation of VirtualBox's COM API with a Pythoninc interface",
21+
description="Complete implementation of VirtualBox's COM API with a Pythonic interface",
2222
long_description=open("README.rst").read(),
2323
license=about["__license__"],
2424
zip_safe=False,

virtualbox/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
__author_email__ = "mjdorma+pyvbox@gmail.com"
44
__maintainer__ = "Seth Michael Larson"
55
__maintainer_email__ = "sethmichaellarson@gmail.com"
6-
__version__ = "2.0.0"
6+
__version__ = "2.1.0"
77
__license__ = "Apache-2.0"
88
__url__ = "https://github.com/sethmlarson/virtualbox-python"

virtualbox/library.py

Lines changed: 190 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Complete implementation of VirtualBox's COM API with a Pythoninc interface.
1+
# Complete implementation of VirtualBox's COM API with a Pythonic interface.
22
#
33
# Note: Commenting, and API structure generation was carved from
44
# VirtualBox project's VirtualBox.xidl Main API definition.
@@ -81,11 +81,11 @@
8181
"""
8282

8383

84-
vbox_version = "6.1.14"
84+
vbox_version = "6.1.16"
8585
lib_version = 1.3
8686
lib_app_uuid = "819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
8787
lib_uuid = "d7569351-1750-46f0-936e-bd127d5bc264"
88-
xidl_hash = "f6fc2decce1cdf49f616583addcd3ab4"
88+
xidl_hash = "09a60b2cdcbf61f994e4eb01863c81d1"
8989

9090

9191
class VBoxErrorObjectNotFound(VBoxError):
@@ -2106,7 +2106,7 @@ class PartitionType(Enum):
21062106

21072107
.. describe:: linux_srv(307)
21082108

2109-
Linux /srv partition..
2109+
Linux /srv partition.
21102110

21112111
.. describe:: linux_plain_dm_crypt(308)
21122112

@@ -2599,7 +2599,7 @@ class PartitionType(Enum):
25992599
("LinuxRootARM32", 304, """Linux root partition for ARM32."""),
26002600
("LinuxRootARM64", 305, """Linux root partition for ARM64 / AArch64."""),
26012601
("LinuxHome", 306, """Linux /home partition."""),
2602-
("LinuxSrv", 307, """Linux /srv partition.."""),
2602+
("LinuxSrv", 307, """Linux /srv partition."""),
26032603
("LinuxPlainDmCrypt", 308, """Linux plain dm-crypt partition."""),
26042604
("LinuxLUKS", 309, """Linux unitified key setup (LUKS) partition."""),
26052605
("LinuxReserved", 310, """Linux reserved partition."""),
@@ -8303,17 +8303,33 @@ class VBoxEventType(Enum):
83038303

83048304
See :py:class:`IClipboardFileTransferModeChangedEvent` IClipboardFileTransferModeChangedEvent.
83058305

8306-
.. describe:: on_cloud_provider_registered(105)
8306+
.. describe:: on_cloud_provider_list_changed(105)
83078307

8308-
See :py:class:`ICloudProviderRegisteredEvent` ICloudProviderRegisteredEvent.
8308+
See :py:class:`ICloudProviderListChangedEvent` .
83098309

8310-
.. describe:: last(106)
8310+
.. describe:: on_cloud_provider_registered(106)
8311+
8312+
See :py:class:`ICloudProviderRegisteredEvent` .
8313+
8314+
.. describe:: on_cloud_provider_uninstall(107)
8315+
8316+
See :py:class:`ICloudProviderUninstallEvent` .
8317+
8318+
.. describe:: on_cloud_profile_registered(108)
8319+
8320+
See :py:class:`ICloudProfileRegisteredEvent` .
8321+
8322+
.. describe:: on_cloud_profile_changed(109)
8323+
8324+
See :py:class:`ICloudProfileChangedEvent` .
8325+
8326+
.. describe:: last(110)
83118327

83128328
Must be last event, used for iterations and structures relying on numerical event values.
83138329

83148330
"""
83158331

8316-
__uuid__ = "d5d15e38-808d-11e9-aaac-4bc5d973ca37"
8332+
__uuid__ = "2ab7c196-f232-11ea-a5d2-83b96bc30bcc"
83178333
_enums = [
83188334
("Invalid", 0, """Invalid event, must be first."""),
83198335
(
@@ -8709,13 +8725,33 @@ class VBoxEventType(Enum):
87098725
"""See :py:class:`IClipboardFileTransferModeChangedEvent` IClipboardFileTransferModeChangedEvent.""",
87108726
),
87118727
(
8712-
"OnCloudProviderRegistered",
8728+
"OnCloudProviderListChanged",
87138729
105,
8714-
"""See :py:class:`ICloudProviderRegisteredEvent` ICloudProviderRegisteredEvent.""",
8730+
"""See :py:class:`ICloudProviderListChangedEvent` .""",
87158731
),
87168732
(
8717-
"Last",
8733+
"OnCloudProviderRegistered",
87188734
106,
8735+
"""See :py:class:`ICloudProviderRegisteredEvent` .""",
8736+
),
8737+
(
8738+
"OnCloudProviderUninstall",
8739+
107,
8740+
"""See :py:class:`ICloudProviderUninstallEvent` .""",
8741+
),
8742+
(
8743+
"OnCloudProfileRegistered",
8744+
108,
8745+
"""See :py:class:`ICloudProfileRegisteredEvent` .""",
8746+
),
8747+
(
8748+
"OnCloudProfileChanged",
8749+
109,
8750+
"""See :py:class:`ICloudProfileChangedEvent` .""",
8751+
),
8752+
(
8753+
"Last",
8754+
110,
87198755
"""Must be last event, used for iterations and structures relying on numerical event values.""",
87208756
),
87218757
]
@@ -19196,9 +19232,9 @@ class IHostDrivePartition(Interface):
1919619232
@property
1919719233
def number(self):
1919819234
"""Get int value for 'number'
19199-
The number of the partition.
19200-
<!-- @todo r=bird: This is weird numbering scheme for MBR disk as it goes 1,2,3,4,5,7,9,11,...
19201-
And has no practical use. It would be better to use the system specific device node numbering here. -->
19235+
The number of the partition. Represents the system number of the
19236+
partition, e.g. /dev/sdX in the linux, where X is the number
19237+
returned.
1920219238
"""
1920319239
ret = self._get_attr("number")
1920419240
return ret
@@ -19225,7 +19261,7 @@ def type_p(self):
1922519261
"""Get PartitionType value for 'type'
1922619262
A translation of :py:func:`IHostDrivePartition.type_mbr` and
1922719263
:py:func:`IHostDrivePartition.type_uuid` when possible, otherwise
19228-
set to :py:func:`PartitionType.unknown` .
19264+
set to :py:attr:`PartitionType.unknown` .
1922919265
"""
1923019266
ret = self._get_attr("type")
1923119267
return PartitionType(ret)
@@ -19322,8 +19358,14 @@ def name(self):
1932219358
class IHostDrive(Interface):
1932319359
"""
1932419360
The IHostDrive interface represents the drive of the physical machine.
19325-
It is not complete medium description and, therefore, it is not IMedium
19326-
based. The interface is used just for getting a host drive partitions info.
19361+
It is not a complete medium description and, therefore, it is not IMedium
19362+
based. The interface is used to get information about a host drive and
19363+
its partitioning.
19364+
19365+
The object operates in limited mode if the user cannot open the drive
19366+
and parse the partition table. In limited mode on the
19367+
:py:func:`IHostDrive.drive_path` and :py:func:`IHostDrive.model`
19368+
attributes can be accessed, the rest will fail with E_ACCESSDENIED.
1932719369
"""
1932819370

1932919371
__uuid__ = "70e2e0c3-332c-4d72-b822-2db16e2cb31b"
@@ -36895,7 +36937,11 @@ def set_integer(self, value):
3689536937

3689636938

3689736939
class IStringFormValue(IFormValue):
36898-
""""""
36940+
"""
36941+
Intnded for cases when a read-only string value is used to
36942+
display information and different string is to be used when
36943+
copying to the clipboard.
36944+
"""
3689936945

3690036946
__uuid__ = "cb6f0f2c-8384-11e9-921d-8b984e28a686"
3690136947
__wsmap__ = "managed"
@@ -36929,6 +36975,16 @@ def set_string(self, text):
3692936975
progress = IProgress(progress)
3693036976
return progress
3693136977

36978+
@property
36979+
def clipboard_string(self):
36980+
"""Get str value for 'clipboardString'
36981+
Intnded for cases when a read-only string value is used to
36982+
display information and different string is to be used when
36983+
copying to the clipboard.
36984+
"""
36985+
ret = self._get_attr("clipboardString")
36986+
return ret
36987+
3693236988

3693336989
class IChoiceFormValue(IFormValue):
3693436990
""""""
@@ -37505,6 +37561,29 @@ def cloud_machine_list(self):
3750537561
ret = self._get_attr("cloudMachineList")
3750637562
return [ICloudMachine(a) for a in ret]
3750737563

37564+
def read_cloud_machine_stub_list(self):
37565+
"""Make the list of cloud machine stubs available via
37566+
:py:func:`cloud_machine_stub_list` attribute.
37567+
Like with :py:func:`get_cloud_machine` , the returned machines
37568+
are initiatally inaccessible and require a refresh to get
37569+
their data from the cloud.
37570+
37571+
return progress of type :class:`IProgress`
37572+
Progress object to track the operation completion.
37573+
37574+
"""
37575+
progress = self._call("readCloudMachineStubList")
37576+
progress = IProgress(progress)
37577+
return progress
37578+
37579+
@property
37580+
def cloud_machine_stub_list(self):
37581+
"""Get ICloudMachine value for 'cloudMachineStubList'
37582+
See :py:func:`read_cloud_machine_stub_list` .
37583+
"""
37584+
ret = self._get_attr("cloudMachineStubList")
37585+
return [ICloudMachine(a) for a in ret]
37586+
3750837587
def add_cloud_machine(self, instance_id):
3750937588
"""Adopt a running instance and register it as cloud machine.
3751037589
This is kinda like adding a local .vbox file as a local VM.
@@ -38302,10 +38381,32 @@ def get_provider_by_name(self, provider_name):
3830238381
return provider
3830338382

3830438383

38384+
class ICloudProviderListChangedEvent(IEvent):
38385+
"""
38386+
Each individual provider that is installed or uninstalled is
38387+
reported as an :py:class:`ICloudProviderRegisteredEvent` . When
38388+
the batch is done this event is sent and listerns can get the
38389+
new list.
38390+
"""
38391+
38392+
__uuid__ = "a54d9cca-f23f-11ea-9755-efd0f1f792d9"
38393+
__wsmap__ = "managed"
38394+
id = VBoxEventType.on_cloud_provider_list_changed
38395+
38396+
@property
38397+
def registered(self):
38398+
"""Get bool value for 'registered'"""
38399+
ret = self._get_attr("registered")
38400+
return ret
38401+
38402+
3830538403
class ICloudProviderRegisteredEvent(IEvent):
38306-
""""""
38404+
"""
38405+
A cloud provider was installed or uninstalled.
38406+
See also :py:class:`ICloudProviderListChangedEvent` .
38407+
"""
3830738408

38308-
__uuid__ = "3d515696-eb98-11ea-96ac-8b4794b20214"
38409+
__uuid__ = "e28e227a-f231-11ea-9641-9b500c6d5365"
3830938410
__wsmap__ = "managed"
3831038411
id = VBoxEventType.on_cloud_provider_registered
3831138412

@@ -38320,3 +38421,71 @@ def registered(self):
3832038421
"""Get bool value for 'registered'"""
3832138422
ret = self._get_attr("registered")
3832238423
return ret
38424+
38425+
38426+
class ICloudProviderUninstallEvent(IEvent):
38427+
"""
38428+
A cloud provider is about to be uninstalled.
38429+
Unlike :py:class:`ICloudProviderRegisteredEvent` this one is
38430+
waitable and is sent *before* an attempt is made to
38431+
uninstall a provider. Listerns should release references to the
38432+
provider and related objects if they have any, or the
38433+
uninstallation of the provider is going to fail because it's
38434+
still in use.
38435+
"""
38436+
38437+
__uuid__ = "f01f1066-f231-11ea-8eee-33bb2afb0b6e"
38438+
__wsmap__ = "managed"
38439+
id = VBoxEventType.on_cloud_provider_can_uninstall
38440+
38441+
@property
38442+
def id_p(self):
38443+
"""Get str value for 'id'"""
38444+
ret = self._get_attr("id")
38445+
return ret
38446+
38447+
38448+
class ICloudProfileRegisteredEvent(IEvent):
38449+
""""""
38450+
38451+
__uuid__ = "6a5e65ba-eeb9-11ea-ae38-73242bc0f172"
38452+
__wsmap__ = "managed"
38453+
id = VBoxEventType.on_cloud_profile_registered
38454+
38455+
@property
38456+
def provider_id(self):
38457+
"""Get str value for 'providerId'"""
38458+
ret = self._get_attr("providerId")
38459+
return ret
38460+
38461+
@property
38462+
def name(self):
38463+
"""Get str value for 'name'"""
38464+
ret = self._get_attr("name")
38465+
return ret
38466+
38467+
@property
38468+
def registered(self):
38469+
"""Get bool value for 'registered'"""
38470+
ret = self._get_attr("registered")
38471+
return ret
38472+
38473+
38474+
class ICloudProfileChangedEvent(IEvent):
38475+
""""""
38476+
38477+
__uuid__ = "83795a4c-fce1-11ea-8a17-636028ae0be2"
38478+
__wsmap__ = "managed"
38479+
id = VBoxEventType.on_cloud_profile_changed
38480+
38481+
@property
38482+
def provider_id(self):
38483+
"""Get str value for 'providerId'"""
38484+
ret = self._get_attr("providerId")
38485+
return ret
38486+
38487+
@property
38488+
def name(self):
38489+
"""Get str value for 'name'"""
38490+
ret = self._get_attr("name")
38491+
return ret

0 commit comments

Comments
 (0)