Joshua Boniface
e0dfda3ff6
Send a useful retcode for failed lists
2020-01-05 02:34:55 -05:00
Joshua Boniface
c032cf3f49
Correct bad variables
2020-01-05 00:55:17 -05:00
Joshua Boniface
41766febe6
Fix name of endpoint
2020-01-04 14:21:15 -05:00
Joshua Boniface
c34ec68038
Return delete
2020-01-04 14:07:58 -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
a10ce95be3
Remove a few more instances of userdata_template
2020-01-04 13:58:48 -05:00
Joshua Boniface
8fea073b55
Fix remaining instances of userdata_template
2020-01-04 13:42:16 -05:00
Joshua Boniface
1c12a4c2f9
Fix bugs around userdata
2020-01-04 12:52:30 -05:00
Joshua Boniface
e1c7705c3e
Add missing return value
2020-01-04 11:48:13 -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
c9b8355ff0
Fix bad handling of Nonetype
2020-01-03 12:07:32 -05:00
Joshua Boniface
816dbac912
Remove explicit flask.jsonify
2020-01-03 12:00:06 -05:00
Joshua Boniface
7ed6308e80
Correct handling of template arguments
2020-01-03 11:55:41 -05:00
Joshua Boniface
9b8dec8991
Add missing reqargs argument
2020-01-03 11:50:13 -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
a661fec105
Handle boolean config values properly
2019-12-30 09:34:45 -05:00
Joshua Boniface
6de65378ca
Fix bad metadata documentation
2019-12-29 20:58:02 -05:00
Joshua Boniface
3b08e887f8
Add cluster status to API
2019-12-29 20:52:05 -05:00
Joshua Boniface
e29405c1ed
Add missing argument to net_modify
2019-12-27 12:18:01 -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
33e5dcd5e8
Add missing reqargs to network put
2019-12-27 12:12:07 -05:00
Joshua Boniface
1d4e4d178c
Correct bad comma
2019-12-26 18:58:46 -05:00
Joshua Boniface
5e226af4a1
Pass VM argument into function
2019-12-26 18:56:34 -05:00
Joshua Boniface
89f598e429
Fix another instance of selector name
2019-12-26 18:55:01 -05:00
Joshua Boniface
f178436025
Fix selector name in POST
2019-12-26 18:53:35 -05:00
Joshua Boniface
c9fb9600a4
Fix two small bugs and regen docs
2019-12-26 18:45:11 -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
9b81a02805
Disable doc endpoint to avoid flask_swagger dep
2019-12-24 11:19:06 -05:00
Joshua Boniface
f48d1e6d40
Add documentation for API_Doc endpoint
2019-12-24 08:59:17 -05:00
Joshua Boniface
914b3d84e1
Fix URL hosts
2019-12-23 21:17:30 -05:00
Joshua Boniface
142e1f186d
Fix in-app host URL
2019-12-23 21:15:26 -05:00
Joshua Boniface
398fb2dfe9
Set URL and information in local swagger.json
2019-12-23 21:09:58 -05:00
Joshua Boniface
57127d2fa8
Move gen-doc helper script
2019-12-23 20:51:44 -05:00
Joshua Boniface
a6683d5b17
Rebuild API using Flask-RESTful and Swagger docs
2019-12-23 20:43:20 -05:00
Joshua Boniface
7901ffb5e3
Handle the list of node_limits even better
2019-12-19 13:22:38 -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
a2b30158f8
Move schema file
2019-12-14 16:47:32 -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
Joshua Boniface
45ef7f2a30
Use better layout in entrypoint
2019-10-13 12:15:54 -04:00
Joshua Boniface
ad5f232c03
Update header names
2019-10-13 12:11:23 -04:00
Joshua Boniface
03447d3374
Update copyright string year to include 2019
2019-10-13 12:09:51 -04:00
Joshua Boniface
a9e9198970
Rename API library file
2019-10-13 12:07:57 -04:00
Joshua Boniface
e5393082b6
Use build-in selector and respect limits in client
...
Use the new built-in selector option, as well as respecting node limits,
when performing migrate or move actions on a VM via the clients.
2019-10-12 01:45:44 -04:00
Joshua Boniface
5995353597
Implement VM metadata and use it
...
Implements the storing of three VM metadata attributes:
1. Node limits - allows specifying a list of hosts on which the VM must
run. This limit influences the migration behaviour of VMs.
2. Per-VM node selectors - allows each VM to have its migration
autoselection method specified, to automatically allow different methods
per VM based on the administrator's preferences.
3. VM autorestart - allows a VM to be automatically restarted from a
stopped state, presumably due to a failure to find a target node (either
due to limits or otherwise) during a flush/fence recovery, on the next
node unflush/ready state of its home hypervisor. Useful mostly in
conjunction with limits to ensure that VMs which were shut down due to
there being no valid migration targets are started back up when their
node becomes ready again.
Includes the full client interaction with these metadata options,
including printing, as well as defining a new function to modify this
metadata. For the CLI it is set/modified either on `vm define` or via the
`vm meta` command. For the API it is set/modified either on a POST to
the `/vm` endpoint (during VM definition) or on POST to the `/vm/<vm>`
endpoint. For the API this replaces the previous reserved word for VM
creation from scratch as this will no longer be implemented in-daemon
(see #22 ).
Closes #52
2019-10-12 01:17:39 -04:00
Joshua Boniface
aaf9f5e43b
Add clone volume to API
2019-10-10 14:37:35 -04:00
Joshua Boniface
3b7c1adf71
Implement configurable replcfg (client-side)
...
Implements administrator-selectable replication configurations for new
pools in PVC clusters, overriding the default of copies=3,mincopies=2.
2019-08-23 14:12:15 -04:00
Joshua Boniface
ea2426fa73
Implement additional functions
...
1. VM state
2. VM node
3. Lock flush
2019-08-07 14:46:20 -04:00
Joshua Boniface
a3c96764e0
Implement getting Node states via API
2019-07-28 23:31:59 -04:00
Joshua Boniface
47c72d9b68
Move token authentication to X-Api-Token header
...
Implements #46
2019-07-28 23:12:53 -04:00
Joshua Boniface
2dbf276e51
Implement snapshot renaming
...
[3/2] Implements #44
2019-07-28 23:00:35 -04:00
Joshua Boniface
4937c01075
Remove junk whitespace
2019-07-26 15:13:21 -04:00
Joshua Boniface
d5f263bdd6
Implement Ceph volume resize and rename in clients
...
[1/2] Implements #44
2019-07-26 15:13:21 -04:00
Joshua Boniface
6b41f6556c
Handle returning empty lists better (404)
2019-07-26 13:15:54 -04:00
Joshua Boniface
b7960cd221
Use only one element in OSD state
2019-07-26 11:57:14 -04:00
Joshua Boniface
17b463afd4
Replace retcodes with 400; implement OSD status
2019-07-26 11:23:19 -04:00
Joshua Boniface
4cf3ade10a
RESTify the remaining components
2019-07-26 11:00:11 -04:00
Joshua Boniface
d43ced176f
RESTify the network endpoints; remove some cruft
2019-07-26 09:41:46 -04:00
Joshua Boniface
375bbf4b82
Fix quoting bugs in API
2019-07-25 16:50:17 -04:00
Joshua Boniface
1d944f5627
Fully remove dump endpoing; data is now in output
2019-07-25 16:46:03 -04:00
Joshua Boniface
f4d63b9088
Remove vm_dump API function
2019-07-25 15:45:31 -04:00
Joshua Boniface
dff1c68f6e
RESTify the VM functions and enable debug mode
2019-07-25 15:42:17 -04:00
Joshua Boniface
9ccf3390ab
Add storage prefix to Ceph commands
...
Add the "storage" prefix to all Ceph-based commands in both the CLI and
the API. This partially abstracts the storage subsystem from the Ceph
tool specifically, should future storage subsystems be added or changed.
The name "ceph" is still used due to the non-abstracted components of
the Ceph management, e.g. referencing Ceph-specific concepts like OSDs
or pools.
2019-07-10 15:14:17 -04:00
Joshua Boniface
b0bdf72310
Fix bad variable name
2019-07-08 22:24:18 -04:00
Joshua Boniface
7889bd88e3
Use equality instead of in
2019-07-08 22:22:43 -04:00
Joshua Boniface
31b4dd9aed
Show radosdf output in clients
2019-07-08 10:59:49 -04:00
Joshua Boniface
771c193343
Add even nicer startup message
2019-07-07 15:46:38 -04:00
Joshua Boniface
c9bad6edf9
Log messages during startup
2019-07-07 15:44:47 -04:00
Joshua Boniface
c3e86be6a3
Disable debugging of API
2019-07-07 02:26:46 -04:00
Joshua Boniface
425392f2e6
Better handle auth enabling
2019-07-07 00:16:50 -04:00
Joshua Boniface
4724f79877
Change order in sample yaml
2019-07-07 00:10:01 -04:00
Joshua Boniface
9215931ceb
Support token authentication with login/logout
2019-07-07 00:08:02 -04:00
Joshua Boniface
8aedd78879
Support SSL for the API
2019-07-06 23:28:29 -04:00
Joshua Boniface
837b47c366
Use coordinators list like node daemon
2019-07-06 02:35:37 -04:00
Joshua Boniface
e6012965f1
Add YAML header to sample config files
2019-07-06 02:24:35 -04:00
Joshua Boniface
9d4acc91a5
Correct typo
2019-07-06 02:12:24 -04:00
Joshua Boniface
582a9f4f75
Make defaults nicer
2019-07-06 02:11:42 -04:00
Joshua Boniface
c638bdeaee
Add configuration file, authentication, pywsgi
2019-07-06 02:04:26 -04:00
Joshua Boniface
e4576c016f
Move API client filename
2019-07-05 23:26:41 -04:00
Joshua Boniface
f5644e53bf
Add unit file for API client daemon
2019-07-05 22:25:07 -04:00
Joshua Boniface
2ce08b6369
Implement API for Ceph functions
2019-07-05 22:14:58 -04:00
Joshua Boniface
4e94331d1a
Implement API for network functions
2019-07-05 21:39:04 -04:00
Joshua Boniface
b7480b3bbc
Implement all VM API functions
2019-07-05 18:24:14 -04:00
Joshua Boniface
061b4eb61e
Refactor API into separate files
...
Make it easier to separate the model (i.e. API endpoints) from the
controller (i.e. the actual functions which talk to ZK). Helps to keep
the main API file smaller and more regular.
2019-07-05 14:11:01 -04:00
Joshua Boniface
e31e1264e5
RESTify the API removing specific list endpoints
2019-07-05 13:20:06 -04:00
Joshua Boniface
c7269a092e
Use request.values instead of request.args
2019-07-05 13:05:33 -04:00
Joshua Boniface
193567f965
Further work on API client
...
Add list and info endpoints for all areas; add dummy endpoints for all
remaining endpoints.
2019-07-05 01:19:39 -04:00
Joshua Boniface
8d5549c68f
Implement better arg handling and lists
2019-07-04 12:56:41 -04:00
Joshua Boniface
ae1650759b
Add new endpoints
2019-05-10 23:26:59 -04:00
Joshua Boniface
e41b3053f7
Update methods to POST where relevant
2019-04-12 12:27:49 -04:00