Commit Graph

14 Commits

Author SHA1 Message Date
Ondřej Budai 045bddb37a fix typo in api docstring 2019-11-27 12:24:03 +02:00
Brian C. Lane 3fdc783850 docs: Fix Sphinx errors in docstrings 2019-10-16 13:52:54 -07:00
Brian C. Lane 146560b959 Add upload status examples to compose route docstrings 2019-10-16 09:17:53 -07:00
Brian C. Lane d16e8f5bfc Change /compose/uploads/delete to /upload/delete
Remove the requirement to pass the compose uuid and the upload uuid --
only the upload uuid is needed.
2019-10-16 09:17:53 -07:00
Brian C. Lane 0eda252d61 Add profile support to /uploads/schedule/
Pass in the name of a profile in the `profile` field, or pass in
one-time use settings in the `settings` object.
2019-10-16 09:17:53 -07:00
Brian C. Lane 7396c272b2 Use consistent naming for upload uuids
Since we have both compose uuids and upload uuids they need to be
clearly named. This updates the upload naming to use 'upload_uuid' in
the inputs, and 'upload_id' in the output (_id instead of _uuid for
consistency with build_id naming in the status responses).

This also adds 'upload_id' to the /upload/log response.
2019-10-16 09:17:53 -07:00
Brian C. Lane f8f06ccd23 Fix some docstrings in the v1 API 2019-10-16 09:17:53 -07:00
Brian C. Lane c384b687ba Add /upload/providers/delete route
This allows deleting a provider's profile. Pass the provider and profile
name like:

/api/v1/upload/providers/delete/azure/test-settings

A standard json response will be returned.
2019-10-16 09:17:53 -07:00
Brian C. Lane 5d7aa95f2f Add support for starting a compose upload with the profile
This extends the /compose/ route to support uploading with either an
existing profile, or with one-time use settings passed in the POST.

To select a profile include the provider and profile, as returned by
`/uploads/providers`:

    "upload": {
      "image_name": "My Image",
      "provider": "azure",
      "profile": "production-azure-settings"
    }
2019-10-16 09:17:53 -07:00
Brian C. Lane 3a453eaad7 Make sure V0 API doesn't return uploads information
uploads should only be included in the V1 API routes, add `api`
selection to the relevant helper functions and calls to them from v0.py

Add new V1 routes with api=1 to include the uploads information in the
results.

Also add tests to ensure that V0 requests do not include uploads.
2019-10-16 09:17:53 -07:00
Evan Goode 2692e8138c Automatically upload composed images to the cloud
Currently, Azure, vSphere, and OpenStack are supported. See
https://github.com/weldr/lorax/pull/826 for more details about this new
feature.

I've called the upload library "lifted" as a reference to Seuss'
The Lorax -- in the book, the Lorax lifts himself up by the seat of his
pants through a hole in the smog clouds, and they start calling him the
"Lifted Lorax."

This adds new features to the /compose route under API v1
2019-10-16 09:17:53 -07:00
Brian C. Lane 6f686ff9d6 lorax-composer: Add support for dnf variables to repo sources
This loads the system dnf vars from /etc/dnf/vars at startup if
system repos are enabled, and it substitutes the values in the sources
when loaded, and when a new source is added.

Also includes tests.
2019-08-20 16:26:03 -07:00
Brian C. Lane 1e88a99443 lorax-composer: Add v1 API for projects/source/
This changes the source 'name' field to match the DNF usage of it as a
descriptive string. 'id' is now used as the short name to refer to the
source. The v0 API remains unchanged.

Tests for v1 behavior have been added.

Now that the v1 API is in use the status message will return api: 1
2019-08-07 13:26:35 -07:00
Brian C. Lane 278214ff8e Add /api/v1/ handler with no routes 2019-08-06 16:08:10 -07:00