47 Commits

Author SHA1 Message Date
0bf276fd51 Update copyright year in headers 2021-03-25 17:01:55 -04:00
f4ec161aa2 Update file copyright header.
Remove the option to select a later version of the GPL.
2021-03-25 16:58:02 -04:00
4e58b18976 Ensure cloned volume size is int type 2021-03-15 15:12:24 -04:00
593c9a7e0d Fix bugs around cloned volume provisioning 2021-03-09 16:59:49 -05:00
0bf130077c Lint: W605 invalid escape sequence '<char>'
The previous attempt to correct these with character classes failed.
Instead, use the proper `r'blah'` regex formatting.
2020-11-07 17:41:09 -05:00
3ed97d209f Revert "Lint: W605 invalid escape sequence '\^'"
This reverts commit 639937f9c2be4de57d74380072be4262fde93220.
2020-11-07 17:39:34 -05:00
f33398458e Revert "Lint: W605 invalid escape sequence '\$'"
This reverts commit 76b1cafdcc0d276bb0c038992d103b6696910644.
2020-11-07 17:38:03 -05:00
260b39ebf2 Lint: E302 expected 2 blank lines, found X 2020-11-07 14:45:24 -05:00
6c56d45345 Lint: F821 undefined name 'config'
This variable is set after importing these files by the flaskapi module.
Thus, simply set a default at the top of each file to avoid linting
errors.
2020-11-07 13:23:34 -05:00
7932be3948 Lint: E261 at least two spaces before inline comment 2020-11-07 13:11:03 -05:00
d2490419c5 Lint: E202 whitespace before ']' 2020-11-07 13:02:54 -05:00
3f242cd437 Lint: E202 whitespace before '}' 2020-11-07 12:57:42 -05:00
b7daa8e1f6 E201 whitespace after '[' 2020-11-07 12:39:59 -05:00
e333f2b935 Lint: E201 whitespace after '{' 2020-11-07 12:38:31 -05:00
905b81c47d Lint: E231 missing whitespace after ',' 2020-11-07 12:34:12 -05:00
8ba267a59e Lint: E211 whitespace before '['/'(' 2020-11-07 12:20:01 -05:00
cb2defbde9 Lint: W391 blank line at end of file 2020-11-06 21:14:19 -05:00
5da314902f Lint: F841 local variable '<variable>' is assigned to but never used 2020-11-06 21:13:13 -05:00
aecb845d6a Lint: E713 test for membership should be 'not in' 2020-11-06 20:37:52 -05:00
d9e7b7ec15 Lint: F401 <library> imported but unused 2020-11-06 19:22:49 -05:00
ebf254f62d Lint: W293 blank line contains whitespace 2020-11-06 19:11:07 -05:00
76b1cafdcc Lint: W605 invalid escape sequence '\$' 2020-11-06 19:01:22 -05:00
639937f9c2 Lint: W605 invalid escape sequence '\^' 2020-11-06 18:59:30 -05:00
63f4f9aed7 Lint: E722 do not use bare 'except' 2020-11-06 18:55:10 -05:00
e984f315f1 Correct bug in finding system template list 2020-10-29 12:14:10 -04:00
ec0b8acf90 Support per-VM migration type selectors
Allow a VM to specify its migration type as a default choice. The valid
options are "default" (i.e. behave as now), "live" which forces a live
migration only, and "shutdown" which forces a shutdown migration only.
The new option is treated as a VM meta option and is set to default if
not found.
2020-10-29 12:01:29 -04:00
3dbdd12d8f Correct invalid comparison in template VNI add 2020-08-18 09:48:56 -04:00
0d470ae5f6 Work around formatting fail 2020-08-12 12:12:16 -04:00
0dd719a682 Use single-quotes so Python isn't confused 2020-08-11 17:24:11 -04:00
5526e13da9 Move all host provisioner steps to a try block
Make the provisioner a bit more robust. This way, even if a provisioning
step fails, cleanup is still performed this preventing the system from
being left in an undefined state requiring manual correction.

Addresses #91
2020-08-06 12:27:10 -04:00
9f86f12f1a Only parse script_run_args if not None 2020-07-16 02:36:26 -04:00
a1ba9d2eeb Allow specifying arbitrary script_args on CLI
Allow the specifying of arbitrary provisioner script install() args on
the provisioner create CLI, either overriding or adding additional
per-VM arguments to those found in the profile. Reference example is
setting a "vm_fqdn" on a per-run basis.

Closes #100
2020-07-08 13:18:12 -04:00
b91923735c Move some messages around 2020-05-05 16:19:18 -04:00
4a52ff56b9 Catch failures in getPoolInformation
Fixes #90
2020-03-15 16:58:13 -04:00
ca5327b908 Make strtobool even more robust
If strtobool fails, return False always.
2020-03-09 09:30:16 -04:00
d36d8e0637 Use custom strtobool to handle weird edge cases 2020-03-06 09:40:13 -05:00
fd80eb9e22 Ensure profile creation works with empty lists
If we get a 404 code back from the upper function, we should create an
empty list rather than trying to loop through the dictionary.
2020-02-24 09:30:58 -05:00
6ac82d6ce9 Ensure single-element templates are lists
Ensures any list-assuming statements later on hold true even when there
is only a single template entry.
2020-02-21 10:50:28 -05:00
56a9e48163 Normalize all return messages
Ensure all API return messages are formated the same: no "error", a
final period except when displaying Exception text, and a regular spaced
out format.
2020-02-20 22:42:19 -05:00
097f0d9be4 Fix bug with script load from database 2020-02-18 20:39:36 -05:00
ca68321be3 Allow modification of system templates
Closes #82
2020-02-18 16:18:27 -05:00
b322841edf Complete integration of OVA provisioner
Finishes a basic form of OVA provisioning within the existing create_vm
function. Future plans should include separating out the functions and
cleaning them up a bit more, but this is sufficient for basic operation.

Closes #71
2020-02-18 14:42:45 -05:00
24c86f2c42 Remove obsolete print statement 2020-02-17 23:25:27 -05:00
db558ec91f Complete implementation of OVA handling
Add functions for uploading, listing, and removing OVA images to the API
and CLI interfaces. Includes improved parsing of the OVF and creation of
a system_template and profile for each OVA.

Also modifies some behaviour around profiles, making most components
option at creation to support both profile types (and incomplete
profiles generally).

Implementation part 2/3 - remaining: OVA VM creation

References #71
2020-02-17 23:22:50 -05:00
59ca296c58 Add basic OVA profile support 2020-02-17 12:00:51 -05:00
eeb8879f73 Move run_os_command to common functions
References #80
2020-02-08 23:33:15 -05:00
ce985234c3 Use consistent naming of components
Rename "pvcd" to "pvcnoded", and "pvc-api" to "pvcapid" so names for the
daemons are fully consistent. Update the names of the configuration
files as well to match this new formatting.

References #79
2020-02-08 19:34:07 -05:00