Commit Graph

29 Commits

Author SHA1 Message Date
Brian C. Lane
6a5ff22e61 Add documentation for the API routes.
Use Sphinx on a CentOS7/RHEL7 system to generate the docs with 'make docs'
2018-01-15 14:14:35 -08:00
Brian C. Lane
3c18a63f76 Add support for other branches to the routes
Passing ?branch=<branch-name> will use the specified branch instead of
master.

The new branch will not exist until a /recipes/new?branch=new-branch
POST is made. At that time the branch will be created based on the
current master branch and the new commit will be added to it.
2018-01-02 13:49:09 -08:00
Martin Pitt
32c00c75b3 Fix wrong function name in api/v0/recipes/freeze error messages 2017-12-12 09:23:06 -08:00
Brian C. Lane
a914253102 Add filtering and glob support to /modules/list route 2017-11-22 15:31:21 -08:00
Brian C. Lane
53d6be4703 Add /recipes/freeze route and tests. 2017-11-22 14:46:43 -08:00
Brian C. Lane
4f15fa895b Add /recipes/depsolve route and test 2017-11-22 13:50:02 -08:00
Brian C. Lane
2b43152407 Add /projects and /modules API tests 2017-11-22 10:29:33 -08:00
Brian C. Lane
ed31e81c45 Catch ProjectsError and return an error 400 with a message. 2017-11-21 13:38:56 -08:00
Brian C. Lane
daf18d0467 Add /modules/list and /modules/info routes 2017-11-21 11:10:26 -08:00
Brian C. Lane
4c459c4bf4 Add /projects/depsolve route 2017-11-20 16:50:07 -08:00
Brian C. Lane
a0d6551a3b Add /projects/info route
Elements that have no match in yum (metadata) are set to empty dicts.
2017-11-20 15:32:42 -08:00
Brian C. Lane
2013d73c53 Add /projects/list route 2017-11-20 13:46:43 -08:00
Brian C. Lane
b8f27e7610 Add /api/v0/test route
Returns a simple string to indicate that the API server is running.

/api/v0/status should be used instead, it provides more detailed info in
JSON format.
2017-11-20 10:15:44 -08:00
Brian C. Lane
c6849ee0d9 Add limit/offset to recipes/list 2017-11-15 16:46:13 -08:00
Brian C. Lane
ee9f7f5201 Add error message for offset/limit type errors 2017-11-15 16:46:13 -08:00
Brian C. Lane
52234a34d5 Add error logging to api/v0.py
These will end up in the /var/log/lorax-composer/composer.log
2017-11-15 16:46:13 -08:00
Brian C. Lane
8d8dc3cb1f Add /recipes/diff route and tests 2017-11-14 17:01:35 -08:00
Brian C. Lane
f8b64ce34d Add POST /recipes/tag/ route and tests 2017-11-13 16:48:56 -08:00
Brian C. Lane
f56b7ebf38 Add POST /recipes/undo route and tests 2017-11-13 16:48:56 -08:00
Brian C. Lane
dc5a8c6fb4 Change read_recipe_commit to use the recipe name
Callers really shouldn't need to know the details of the filenames, so
change it to convert it internally.
2017-11-13 16:48:56 -08:00
Brian C. Lane
4858c17fd7 Add DELETE /recipes/delete/<recipe_name> route and tests
Also add numbering to the tests so that they are executed in the
expected order.
2017-11-13 16:48:56 -08:00
Brian C. Lane
305f59175d Add DELETE /recipes/workspace/<recipe_name> route and tests
This will delete the workspace copy of the recipe.
2017-11-13 16:48:56 -08:00
Brian C. Lane
9ff118ed87 Add POST /recipes/workspace route
Also fix use of workspace in /recipes/info (was using filename instead
of recipe name and logic for changed was backwards).
2017-11-13 16:48:56 -08:00
Brian C. Lane
b7499f79d3 Add /recipes/new route and tests
This handles json data when the mime type is "application/json" and toml
recipes when it is "text/x-toml"
2017-11-13 16:44:02 -08:00
Brian C. Lane
63f47c2c00 Add /recipes/changes route with tests. 2017-11-09 18:43:42 -08:00
Brian C. Lane
d58b650904 Add /recipes/info route and tests 2017-11-08 17:38:12 -08:00
Brian C. Lane
641ea8c715 Add /recipes/list route and tests
Includes adding a lock for access to the git repo from the API.
2017-11-08 09:46:12 -08:00
Brian C. Lane
1f7be8a50f Add pylorax.api.recipes code for handling the Recipe's Git repository 2017-10-25 13:31:35 -07:00
Brian C. Lane
5fa8d51b85 lorax-composer initial commit
The lorax-composer program will launch a BDCS compatible API server
using Flask and Gevent. Currently this is a skeleton application with
only one active route (/api/v0/status).

The API code lives in ./src/pylorax/api/v0.py with related code in other
pylorax/api/* modules.
2017-10-04 17:03:08 -07:00