Closed wndhydrnt closed 10 years ago
Hi @wndhydrnt, thanks for the PR. To solve this what we will need is a IHost extension class created under the machine_ext submodule which extends this specific function and implements the behaviour that you have observed as being correct.
The library.py file is automatically generated from the VirtualBox.xidl file which describes the Virtualbox API in great detail. Sometimes the functions defined in the VirtualBox.xidl have been incorrect. As a workaround to this, the library_ext submodule exists so we can easily subclass, override and extend the auto generated classes in library.py. library_ext/init.py is responsible for swapping out the classes defined under library_ext with the auto generated classes in library.
If you want to have a go at it, please do! simply create a host.py module under library_ext, look at how the other extension modules have been written, then extend your IHost class and correct the default behaviour.
Hey @mjdorma thank you for making this clear. I'll follow your advice and check the code in library_ext. Will update this PR as soon as I've figured out the fix.
@mjdorma I created host.py and fixed the bug there. The fix works on my local machine. I also discovered a typo while browsing through the code and fixed that too. I committed this one separately. Hope that's fine.
The call to
"createHostOnlyNetworkInterface"
inIHost.create_host_only_network_interface()
returnedprogress
andhost_interface
objects in a different order than expected. I tested this fix with VirtualBox 4.3.14.