Commit Graph

74 Commits

Author SHA1 Message Date
Joshua Boniface 4e5bce4975 Update copyright header year to 2020 2020-01-08 19:38:02 -05:00
Joshua Boniface c27a024543 Create VM on the cluster before provisioning
Move the tasks around such that the XML is created and the VM is defined
on the cluster before actual provisioning begins. This facilitates us
setting the "provision" state of the VM so clients can see that the VM
is being provisioned.
2020-01-08 18:18:17 -05:00
Joshua Boniface f83ede9ee8 Catch all exceptions around database commits
Just catching IntegrtiyError caused some to be missed; catch anything
instead since it all results in a Bad Request response.
2020-01-08 09:31:08 -05:00
Joshua Boniface 65e3d153cb Fix invalid is_fuzzy logic condition 2020-01-07 11:45:45 -05:00
Joshua Boniface e2b9ce2a70 Fix some bugs in provisioning 2020-01-07 01:44:23 -05:00
Joshua Boniface 977bd2a439 Fix return text of empty profile list 2020-01-07 00:48:00 -05:00
Joshua Boniface 096a740c4f Fix bugs around dhcp4_flag 2020-01-06 15:38:06 -05:00
Joshua Boniface 5edcd45ad6 Handle non-200 codes in the multi-template return 2020-01-06 11:43:32 -05:00
Joshua Boniface a9edbe0234 Improve retdata 2020-01-06 11:32:27 -05:00
Joshua Boniface 5e2efacda5 Strip VM schema when defining 2020-01-05 23:22:23 -05:00
Joshua Boniface 46c5e8e36c Correct bad variable name 2020-01-05 22:11:40 -05:00
Joshua Boniface acc7c1b554 Ensure template code responses accross everything 2020-01-05 22:07:37 -05:00
Joshua Boniface f4ae245184 Avoid splitting an empty node_limit 2020-01-05 21:28:22 -05:00
Joshua Boniface 5521110043 Add missing return failure 2020-01-05 20:16:49 -05:00
Joshua Boniface 80077efc63 Send error in regular message and fix codes 2020-01-05 19:41:55 -05:00
Joshua Boniface 832ca2e4b3 Handle code properly 2020-01-05 19:28:02 -05:00
Joshua Boniface 698b185fb4 Fix bugs with codes and fsargs 2020-01-05 19:11:39 -05:00
Joshua Boniface e433181e34 Support source_volume options to storage volumes 2020-01-05 17:25:34 -05:00
Joshua Boniface cfb5862cf0 Just return an empty log 2020-01-05 17:06:14 -05:00
Joshua Boniface bde0bd6238 Better handle empty script 2020-01-05 16:59:19 -05:00
Joshua Boniface 6306586ad3 Handle new return setup 2020-01-05 16:53:12 -05:00
Joshua Boniface 8b05dfea7b Skip provisioning process steps if script is "empty" 2020-01-05 16:43:50 -05:00
Joshua Boniface c3231ddc24 Wrap list bad request responses in JSON 2020-01-05 15:14:11 -05:00
Joshua Boniface 9d06aa111b Handle creating swap in provisioner 2020-01-05 15:07:48 -05:00
Joshua Boniface 8d758f3e53 Add missing disable function 2020-01-05 14:38:14 -05:00
Joshua Boniface 065ba29c84 Handle retcode from list functions 2020-01-05 02:47:32 -05:00
Joshua Boniface e0dfda3ff6 Send a useful retcode for failed lists 2020-01-05 02:34:55 -05:00
Joshua Boniface 0a04c5d748 Handle empty arguments better 2020-01-04 14:05:42 -05:00
Joshua Boniface c2c6198dae Once more occurrance 2020-01-04 14:00:26 -05:00
Joshua Boniface 8fea073b55 Fix remaining instances of userdata_template 2020-01-04 13:42:16 -05:00
Joshua Boniface 139672d8c9 Fix bug in function argument order 2020-01-04 11:43:35 -05:00
Joshua Boniface 19ea01e17e Don't strip down single-element lists
This is causing problems, so don't do it.
2020-01-04 11:14:55 -05:00
Joshua Boniface e4a83bb063 Use different MAC prefixes for MAC templates 2020-01-04 10:42:04 -05:00
Joshua Boniface a6b6c54422 Use consistent messages and formatting 2020-01-03 13:59:32 -05:00
Joshua Boniface 816dbac912 Remove explicit flask.jsonify 2020-01-03 12:00:06 -05:00
Joshua Boniface 5d92a4aa62 Ensure zk_conn handling is consistent 2020-01-02 12:13:11 -05:00
Joshua Boniface e550d4589d Move userdata from templates
This arrangement was driving me somewhat mad; make userdata just like
script in that it is not a "template".
2019-12-30 15:01:28 -05:00
Joshua Boniface 3b08e887f8 Add cluster status to API 2019-12-29 20:52:05 -05:00
Joshua Boniface e82b851643 Don't bother splitting name_servers 2019-12-27 12:15:57 -05:00
Joshua Boniface bc22c008dd Split the name_servers in the right place 2019-12-27 12:14:34 -05:00
Joshua Boniface 1d4e4d178c Correct bad comma 2019-12-26 18:58:46 -05:00
Joshua Boniface e8d8fb161b Add wait functionality to API domain-state 2019-12-25 20:24:12 -05:00
Joshua Boniface b1c19a21ba Move int cast to helper try block 2019-12-25 19:31:51 -05:00
Joshua Boniface 1f77b382ef Support providing console log lines from API 2019-12-25 19:13:53 -05:00
Joshua Boniface b92c1876d6 Make sure we return True from init function 2019-12-25 12:18:26 -05:00
Joshua Boniface a6683d5b17 Rebuild API using Flask-RESTful and Swagger docs 2019-12-23 20:43:20 -05:00
Joshua Boniface 796fa4692f Pass remaining required args to vm_define 2019-12-19 11:53:24 -05:00
Joshua Boniface 78089afb4e Remove spurious argument to vm_define 2019-12-19 11:43:59 -05:00
Joshua Boniface 0727a7f6ed Move all provisioner API functionality into main 2019-12-14 14:12:55 -05:00
Joshua Boniface 1fb560e996 Add DNS nameservers to networks 2019-12-08 23:55:45 -05:00