Commit Graph

17 Commits

Author SHA1 Message Date
David Moreau Simard 33e4c1d841
Update README to explain ara-server was migrated back into ara
The ara-server standalone repository is being discontinued.
The clear and logical separation of components was nice but the overhead
in complexity was not worth it.

Change-Id: I9d5e3096db4972405932ae2af46ee63bfeef43b5
2019-03-02 08:47:26 -05:00
Guillaume Vincent ca5c065b18 Add Tasks, Records and Plays to Playbook serializer
Change-Id: Ic2456f021107d9397ea561fbc9a60661c34b5f2c
2019-01-15 16:01:48 +01:00
David Moreau Simard 2bd8c3f654
Refactor and standardize how files are added to playbooks
Files are now (once again) related to playbooks.
We expect the playbook to be created first and then it's files are
created and associated to it.

- the /api/v1/playbook/<id>/files endpoint was removed
- the playbook id is now required when doing a POST on /api/v1/files
- playbook.file referenced a file object and no longer exists.
- playbook.file was replaced by "path" which is the path for the playbook
  file.
- playbook.files still exists but, from an API standpoint, this means
  that to find the files associated to a playbook, we can now do
  something like:

    "/api/v1/files?playbook=%s" % playbook.id

To find the playbook file itself, we can do something like:

    "/api/v1/files?playbook=%s&path=%s" % (playbook.id, playbook.path)

Change-Id: Id51129757e1626313caee4005b081027e5694aba
2018-12-20 17:49:01 -05:00
David Moreau Simard c5890ea0cc
Add playbook filtering by status
This allows to search playbook by status (running, failed, completed,
etc.)

Change-Id: I05bba5611bb1f18e48791d570575b6f57c5862d9
2018-12-06 18:03:43 -05:00
Zuul fd9ebc2795 Merge "model: change playbook.completed to playbook.status" 2018-10-16 19:41:35 +00:00
Guillaume Vincent fef942b62f
Add search by name on playbook endpoint
Change-Id: I1ffb958aff4aa466cb15e3e2c2e9f0bb28207224
2018-10-16 09:48:33 -04:00
David Moreau Simard 6440416a60 model: change playbook.completed to playbook.status
We want a bit more granularity regarding the status of the
playbooks, "completed" is not enough.
In 0.x, the status was inferred at runtime. We'll set it so we don't
need to compute it every time.

Change-Id: Ib854ea70827e736fb687a7065986f14d0071291b
2018-10-16 13:42:06 +00:00
David Moreau Simard 128270dd08
Rename the notion of parameters to arguments
What we called parameters are really in fact arguments.
Let's name them as such.

Change-Id: I1fe97ac6856f5a971a811a596eafc04a2d87fc55
2018-10-14 12:44:44 -04:00
Florian Apolloner c653d6a2c5
Added CI for black/isort.
Change-Id: Ib93e64fe1584210d1fe5dce6e0455f0ade0dacca
2018-10-02 09:50:15 -05:00
Florian Apolloner d7b57c9bc3 Run black & isort over the codebase.
Change-Id: I084279e15560a1178376d8ef1ed91ea84c060982
2018-10-01 18:24:47 +02:00
David Moreau Simard 177c3d56be
Add support for giving names to playbooks
Change-Id: I3599c3312069b9bb50976e83f5ae01d064f2a479
2018-09-12 09:17:47 -04:00
David Moreau Simard 369df59435
Remove trailing slashes from URL
This has been annoying me way too much.

(╯°□°)╯︵ ┻━┻

Depends-On: https://review.openstack.org/#/c/577632/
Change-Id: I0d66f3e37027151e8d9d418db30a9c725372a396
2018-06-26 17:07:38 -04:00
David Moreau Simard c91ff18a8c
Unit tests: improve fake/mock content to be more realistic
Give a bit more realistic content for the tests and centralize them
in the factories with helper methods to retrieve compressed versions
so we don't have bytestrings laying around everywhere.

Change-Id: Ie5cd5bf1948778451d6a9d1c748943f2ea3a4f91
2018-06-21 14:57:33 -04:00
David Moreau Simard 50f322932c
Add the concept of reports to the API
A report is a generic container meant to group or correlate different
playbooks.
It could contain a single playbook run or a group of playbook runs.
It can also be used to represent phases or dynamic tagging of playbook
runs.
For example, you could have a report named "failures" and make it so
failed playbooks are added to this report, for example.

The main purpose of this is to make reports generic and dynamic from
an API standpoint so we can build on top of this later.

Change-Id: I398f0337987abe31fa1e886f66ec9c3e644a32d6
2018-06-20 23:40:00 -04:00
David Moreau Simard dd4da299f8
Add comments to describe bytestrings
Change-Id: I6be0ff90d7f24de545e9e3d139d2233439b6fe64
2018-06-20 22:14:28 -04:00
Guillaume Vincent a14228c902 Fix flake8 and bandit tests
* enable voting job on pep8 tox env
 * fix pep8 tox job
 * add db.sqlite3 in ignore file

Change-Id: If11fb74553a6f1cb986cbed17e0fc8386d08c032
2018-06-20 12:39:48 +00:00
David Moreau Simard 1abe276bae
Refactor ara-server into namespaced python modules
This is a structure that will allow us to install everything under
"ara" as separate packages but inside the same module.

For example, installing ara-server will provide ara.server and
ara.api.
Installing ara-clients will provide ara.clients, ara-plugins will
supply ara.plugins, etc.

Change-Id: I27ee431c4e5d946f558befc12937ba2f3c0d020b
2018-06-20 08:38:49 -04:00