Commit Graph

65586 Commits

Author SHA1 Message Date
LoveIsGrief
f8abd87f88 Output a human-readable machine state
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
f4386c9be1 Tests and templates for starting and stopping VMs
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
8c7e885537 Improve the output of list_nodes
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
b859312749 A small TODO
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
abf139a531 Output the default information expected for list_nodes
This still needs to be enriched

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
20b574abef Improve XPCOM to dict conversion
Allow passing tuples of attributes and their default values in case they don't exist in the xpcom object

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
2439d61b02 Improve XPCOM to dict conversion
We will need this in the future when listing machines and requesting attributes that don't exist (yet)

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
43fff23cae Ignore private keys generated by integration tests
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
5867b82ac6 Ignore test log files
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:39:34 +01:00
LoveIsGrief
ec50b5ca51 Remove list_available_images
Following a discussion about it, the function just doesn't apply to virtualbox
virtalbox doesn't have a concept of "templates" so we can't list them

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
c70df10125 Remove some TODOs
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
4cb228aeb7 Oops, that doesn't belong there...
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
f4094ae320 Implement instance destruction
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
38526b2c51 Move virtualbox functions to their own utility module
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
00229e200c List all available images in virtualbox
Does virtualbox have templates?

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
d3103e191b Organize imports a little
This will allow us to import the provider in e.g a virtualenv without doing too much PYTHONPATH fuckery

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
16f44f425b move vbox to its own function
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
3a27c9bbf6 Check existence without an exception
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
5b9f99a3fc Code formatting
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
0099b94b27 Make creating a virtual machine work
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
14b5e9b7b9 Test creating a virtual machine with salt-cloud
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
e02bc0e1d1 A log line y'all!
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
8009f3bc16 Unit tests for xpcomt to dict conversion
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
c39ec47884 Return a dict from an XPCOM object
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
df789aeeec Use the constants for testing
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
50c36b02da Set default log level to INFO
Fix log lines

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
459eaa8945 More rigorous setup precautions for tests
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
2342940f64 Remove unnecessary import
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
98ad2cbe71 Add virtualbox to profile checks
Virtualbox needs the 'clonefrom' property and it doesn't need size

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:54 +01:00
LoveIsGrief
1995b9ad14 PEP8 docstrings
double quotes instead of single quotes

Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:11 +01:00
LoveIsGrief
1545c9de7f Setup testing for calls to salt-cloud
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:11 +01:00
LoveIsGrief
4a1a6a962f Move around files for clarity and separation
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:11 +01:00
LoveIsGrief
b9ec577d11 Add basic configuration for the tests
Related to saltstack/salt#27089 Saltcloud virtualbox provider
2016-02-10 21:38:11 +01:00
LoveIsGrief
c4cb16c379 Post-merge organization 2016-02-10 21:38:11 +01:00
LoveIsGrief
8b7a6919be Moar information 2016-02-10 21:38:11 +01:00
LoveIsGrief
b1faa8f037 Ignore the log directory created by tests 2016-02-10 21:38:11 +01:00
LoveIsGrief
0328673caf De-linting 2016-02-10 21:37:31 +01:00
LoveIsGrief
c07cd63678 Improve tests
Test VM creation, destruction and cloning
2016-02-10 21:37:31 +01:00
LoveIsGrief
47ae6e207e Introduce a method to help us create VMs
(not clones)
2016-02-10 21:37:31 +01:00
LoveIsGrief
ed76f648f6 Create a basic VirtualBoxTestCase with helper assertions 2016-02-10 21:37:31 +01:00
LoveIsGrief
9e3ff6c7c2 Make the logs a little clearer 2016-02-10 21:37:31 +01:00
LoveIsGrief
e2cbe83b5a We need a pass 2016-02-10 21:37:31 +01:00
LoveIsGrief
330e4c7210 Fix some lint errors 2016-02-10 21:37:31 +01:00
LoveIsGrief
516a2428bc Ignore pycharm files 2016-02-10 21:37:31 +01:00
LoveIsGrief
22e5936336 Move out basic virtualbox functions and introduce basic tests 2016-02-10 21:36:45 +01:00
LoveIsGrief
2d23c84057 PEP8 linting 2016-02-10 21:36:45 +01:00
LoveIsGrief
a12923382e Logs to let the user know why stuff fails 2016-02-10 21:36:45 +01:00
LoveIsGrief
09ad1e8ef9 Use correct variable (copy-pasted from linode.py :\ 2016-02-10 21:36:45 +01:00
LoveIsGrief
24e6262f61 Debug line: is virtualbox configured for salt-cloud? 2016-02-10 21:36:45 +01:00
LoveIsGrief
182a31fffe Fill the virtual name for salt-cloud 2016-02-10 21:36:45 +01:00