Commit Graph

16 Commits

Author SHA1 Message Date
Andreas Jaeger e61cc055ab Retire repository
Fuel (from openstack namespace) and fuel-ccp (in x namespace)
repositories are unused and ready to retire.

This change removes all content from the repository and adds the usual
README file to point out that the repository is retired following the
process from
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

See also
http://lists.openstack.org/pipermail/openstack-discuss/2019-December/011647.html

Depends-On: https://review.opendev.org/699362
Change-Id: I10917e42829b459c41ca46514faa72fc46abf7be
2019-12-18 09:52:23 +01:00
Igor Gajsin cb8529a84a add removed handlers
There were urls and handlers for vmware in the nailgun, that were
removed completely in
review.openstack.org/#/c/428402/15/nailgun/nailgun/api/v1/urls.py

The better approach is remain the urls and make special stub-handlers
instead of real ones.

Change-Id: I50bf740ec726c9cc57ff63d49aff718e812e6feb
Closes-Bug: #1668258
2017-03-23 12:26:38 +03:00
Dmitry Sutyagin 03aaca2dee Add limit, offset, order in collection GET
Allow limiting the number of objects returned via GET
by providing "limit"
Example: api/notifications?limit=5

Allow offseting (skipping N first records) via "offset"
Example: api/notifications?offset=100

Allow ordering of objects by providing "order_by"
Example: api/notifications?order_by=-id

Add helper functions/classes to:
- get HTTP parameters (limit, offset, order_by)
- get scoped collection query by applying 4 operations
  filter, order, offset, limit
- set Conent-Range header if scope limits are present

Make default NailgunCollection's GET utilize scoped query
This makes default (parent) GET of child handlers support paging
and ordering (overriden GET methods will not get this functionality
automatically)
NailgunCollection.GET is also an example of how to implement
this new functionality.

Helper functions/classes can be utilized in child handler methods
to implement filters / ordering / paging

Related-Bug: 1657348
Change-Id: I7760465f70b3f69791e7a0c558a26e8ba55c934a
2017-02-14 08:11:23 +00:00
melissaml 211c465c0b Modify use of assertTrue(A in B)
Developers should use assertIn(A, B) instead of assertTrue(A in B ).
Developers should use assertNotIn(A, B) instead of assertFalse(A in B ).

TrivialFix

Change-Id: Ibfb5bda501015383ac170544129c280f99f4f5ed
2016-10-13 14:55:58 +08:00
Dmitry Guryanov 6e31938a0f Split @content decorator
Decorator content does too many different actions, so
let's split it into 3 decorators: @handle_errors,
@validate and @serialize. We can skip calling @serialize
in many places, because those methods just raise some
http error.

Also I've changed return value of all handlers from
serialized json (string) to python's structures, lists
and dicts. So It's become possible to implement different
serializers and I've added support for YAML output.

Change-Id: Ia3da3bd809bcca923d53666eca54def78c995f65
Closes-Bug: #1606211
2016-08-22 12:20:18 +03:00
Dmitry Guryanov c179e5d0b4 add a function get_param_as_set for handler
It's a common task to get list of something from URL,
so let's add this get_param_as_set function and use
it where possible.

Change-Id: I4ae28553117f5ae4de35350270a40e3ac6beaf41
Partial-Bug: #1593751
2016-07-26 18:36:57 +03:00
Sylwester Brzeczkowski 4275cdaedc Snapshot download with authentication
Add new handler SnapshotDownload which returns empty response
with X-Accel-Redirect header. Nginx reads this header and
serves actuall snapshot file.

Also changed 'reverse' function location, let it be more
available for other modules.

Change-Id: Id46b533e8d2a8021d1fbb2e5d4284508e1181704
Implements: blueprint snapshot-download-with-auth
2015-07-03 09:59:35 +00:00
Nikolay Markov 2def4d00fa Wrap errors to JSON in Nailgun API
Partial-Bug: #1391846
Related-Bug: #1423916
Implements blueprint nailgun-wrap-errors-json
Related blueprint: nailgun-api-requests-responses-validation

Change-Id: Ie351d6cd6a5ebf929563a2e0c76ef875fa71c2d3
2015-03-02 11:39:04 +01:00
Nikolay Markov 7ba7a06ccd Initial JSONSchema validation
- errors are now returned as tracebacks, not HTML
- added schema checking based on the handler type and validator
- content_json decorator rewritten completely
- common JSON types
- creation of nodes with non-number ID is now forbidden according to scheme

Implements: blueprint nailgun-api-requests-responses-validation

Change-Id: Icf49bb534ccb19872402b66532ef44418bd66a53
2014-12-15 13:09:38 +03:00
Nikolay Markov 28e54a0248 New project structure for OS-like API versioning
Related to blueprint nailgun-validators-to-objects

Change-Id: I9dfa05deae2d2bcbfd2dfd356392b6f9e62a08cc
2014-05-20 18:17:26 +04:00
Nikolay Markov df965bfcc0 Initial version of Node object
Related to blueprint nailgun-objects-flow

Change-Id: I1a0fe6da827898a6deb405c40cb671476cc7443f
2014-03-28 20:15:54 +04:00
Nikolay Markov e568fb7dec Cluster object
Related to blueprint nailgun-objects-flow

Change-Id: I3dd4c13c8f269cc81a97aa8a3803cd036f56e9bf
2014-03-24 12:25:54 +04:00
Igor Kalnitsky 5f4a674955 Add `http` method to `BaseHandler`
The `BaseHandler.http` method behaves similar to pecan's abort function,
and allows end users to raise http response with custom status code,
custom message and custom headers.

Related to blueprint reduce-dependence-on-webpy
Closes-Bug: #1277174

Change-Id: I8759ada1451446602c107b26a4d7e7fabd99c568
2014-03-20 14:45:19 +02:00
Dima Shulyak 7769a9fbbd Update editable attributes partially
If we receive from PUT smth like:
{"editable": {"storage": {"osd_pool_size": {"value": 3},
"volumes_ceph": {"value": true}}}}

attributes.editable will contain only received data and no default one

Changing paste.TestApp for webtest.TestApp cause TestApp does not have
PATCH method available

Change-Id: I259ee806c9464cb82b391e9c3b633e5e7f5f11d3
Closes-Bug: #1283135
2014-03-12 12:07:59 +02:00
Nikolay Markov f1f418d313 Introducing REST objects - step towards Oslo
Change-Id: I42dd29655f2f50dba911349d4545d3d4c40b9227
2014-01-27 13:12:45 +04:00
e0ne 7d24265fc5 Separate unit and integration tests 2013-09-16 17:28:00 +03:00