LoveIsGrief
69968f73ee
Merge remote-tracking branch 'origin/salt-27089' into salt-27089
...
Conflicts:
.gitignore
salt/config/__init__.py
tests/integration/cloud/providers/virtualbox.py
2016-02-10 21:56:16 +01:00
LoveIsGrief
17735df82d
Move risky event into try/except
...
It might leave the test env in a dirty state, maybe further tests might fail, but we have the log to trace it back to that
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:53:21 +01:00
LoveIsGrief
e5f8227e90
Move @skipIf
to parent classes
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:37 +01:00
LoveIsGrief
002ce06dad
Remove rogue print
statement
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:37 +01:00
LoveIsGrief
54db49b843
Remove some TODOs
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:37 +01:00
LoveIsGrief
fc0b2683b2
A few PEP8 changes
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
dab2356ae1
Check for running machine before getting guest props
...
Outdated values may be retrieved from machines that aren't running
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
2dd3580548
Make sure we close opened ISessions
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
53c7cd87ca
When creating a machine return a dict
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
6149e3e7d0
More documentation of utils
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
5de7cee053
Don't power on a machine by default after creation
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
ef0a26b7cf
Use wait_for
helper in functions related to starting machines
...
Simplifies the code and tries to wait for the correct session state when starting machines
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
a59336f17b
Add warning for timed out functions
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
c05b6f1f7b
Use wait_for
helper in vb_get_network_addresses
...
Simplifies the code
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
66114293bf
Introduce timeout helper
...
This should help us stop copy-pasting the calculations to let us timeout functions
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
24da4ea034
Greentest to stop and restart a machine multiple times
...
We will wait for the session state to unlock before letting exiting the functions (with a timeout of course)
If we don't wait they might still be in a bad session state before the next call. Sadly, that might still be the case as virtualbox decided to introduce "internal" sessions to which we have no access, yet still depend on... yay
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
9323514911
Force reload of vboxapi
...
When called in subprocesses it would have a tendency of forgetting the sys.path, which was modified by the Virtualbox SDK to find its internal modules
Reloading does that for the subprocesses
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
5a55f8a045
Make script runnable as python ...
arg
...
It wouldn't find the correct modules and would crash
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
12a638afd9
Revert "Make sure HAS_LIBS actually works"
...
Virtualbox has some weird "singleton" that can only be created once, is destroyed when the VirtualboxManager is destroyed and cannot be created again
Having one singleton per process isn't possible either since multiprocessing wizardry will share the VirtualboxManager instance across the parent and childprocesses.
Creating a singleton per process doesn't seem to work either and just stalls the program.
The HAS_LIBS will therefore be just that "has" and not "has and will work".
This reverts commit af2e6fb210
.
2016-02-10 21:39:36 +01:00
LoveIsGrief
95ab35203d
Redtest to stop and restart a machine multiple times
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
d09e45ad75
Import the full salt.utils path + logging
...
The debug log exposed private keys
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
a98891a71c
Make sure HAS_LIBS actually works
...
We should initialize the virtualbox connection straight away to catch any init errors and leave `HAS_LIBS = False`
Otherwise it just might not work
I was getting import errors (VBoxPython)
For now it's OK because we only have a local virtualbox connection but later we might make connections to remote ones
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
6cfb447cff
Introduce profiles for testing
...
* virtualbox-deploy-conf won't deploy a script
* virtualbox-minion will do a full deploy with a minion config
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
152a190d69
Fix invalid standard bootstrap-salt.sh path
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
1a8cd747c5
Feature: deploy salt on machine when creating
...
We need to setup the tests with a profile that wants to deploy and use the profile
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:36 +01:00
LoveIsGrief
ef92ba9c8f
Improve doc
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
7b4142dff3
Improve output JSON interpretation cleaning for tests
...
(Actually also fix it because we we popping increasing random elements from the output... not good)
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
63edda4b50
New function for ip addresses
...
Waits on the guest to have one.
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
f56d72b69f
Helper functions should do what they are named for
...
New helpers also added to describe the state of the machine
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
6fb7161aaa
Get real number of slots for VM
...
Before it was theoretical, now it's real (a response from a query the VM, not the hypervisor settings)
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
64411a2986
Improve documentation a little and fix warnings
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
ef24a16f4e
Remove unneeded test
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
7c4b3580f1
Try and stop the running VM as a cleanup
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
1d6b94c279
Starting machines works now too
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
f9b993ea2c
A function doc
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
48b1b3742b
Use common function to output machines
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
8604be624b
Green-test: VirtualboxProviderHeavyTests::test_stop_action
...
We can now tell instances to stop
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
8111dcb092
Force actions in tests
...
Otherwise there is always a confirmation prompt... ain't nobody got time fo' dat!
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
59d212acb1
Provider is getting deprecated in the config
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
04c3bae44f
Move some common test functions to helpers
...
Introduce stop machine test (it's red :( )
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
1b3d96fa9f
First test to get network address from already running guest
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
b195d0f1a7
Use dict output for VirtualboxTests
...
This should make the output from salt-cloud more verifiable and make tests more reliable
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
cd0d63830d
First version to get network adresses from guest
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
4bcd687d1d
A simpler version of list_nodes_select
...
Reuse helper
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
13d49278f0
A little PEP8 cleaning
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
b0752a3d82
Implement list_nodes_select
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
ebd94d8644
Refactoring and code clean up
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
3b052215e2
Implement function show_image
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
acd8736b7b
Green-test: list_nodes_full
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:35 +01:00
LoveIsGrief
a1c94bf01b
Red-test: list_nodes_full
...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00