[APIv2]Enable APIv2, experimentally

Pretty much all the changes from v1->v2 regarding REST semantics,
payload changes, etc have been completed.

So let's enable APIv2 in an experimental state. It will be needed for
exposing some new Sahara features like force-delete, decomission of
a specific node, and hopefully more.

bp v2-api-experimental-impl

Depends-On: I8397ed7c134f0742de8c38466ed3f9035d8103d4
Depends-On: I102fb2ad16d0256e3a9aa364586332a13826cc90
Change-Id: I6ee89d52ab6679c34f0a089df4b111796922e171
This commit is contained in:
Jeremy Freudberg 2017-12-03 03:23:14 +00:00
parent 32d4c744f7
commit 991a3995e2
3 changed files with 22 additions and 14 deletions

View File

@ -3,8 +3,7 @@ API Version 2 Development
The sahara project is currently in the process of creating a new
RESTful application programming interface (API). This interface is
experimental and will not be enabled until it has achieved feature
parity with the current (version 1.1) API.
by-default enabled, although it remains experimental.
This document defines the steps necessary to enable and communicate
with the new API. This API has a few fundamental changes from the

View File

@ -1,16 +1,16 @@
[pipeline:sahara]
pipeline = cors http_proxy_to_wsgi request_id acl auth_validator sahara_api
pipeline = cors http_proxy_to_wsgi request_id acl auth_validator_v2 sahara_api
[composite:sahara_api]
use = egg:Paste#urlmap
/: sahara_apiv11
/: sahara_apiv2
[app:sahara_apiv11]
paste.app_factory = sahara.api.middleware.sahara_middleware:Router.factory
# this app is given as a reference for v1-only deployments
# [app:sahara_apiv11]
# paste.app_factory = sahara.api.middleware.sahara_middleware:Router.factory
# this app is only for use with the experimental v2 API
# [app:sahara_apiv2]
# paste.app_factory = sahara.api.middleware.sahara_middleware:RouterV2.factory
[app:sahara_apiv2]
paste.app_factory = sahara.api.middleware.sahara_middleware:RouterV2.factory
[filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory
@ -22,12 +22,12 @@ paste.filter_factory = oslo_middleware.request_id:RequestId.factory
[filter:acl]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
[filter:auth_validator]
paste.filter_factory = sahara.api.middleware.auth_valid:AuthValidator.factory
# this filter is given as a reference for v1-only deployments
# [filter:auth_validator]
# paste.filter_factory = sahara.api.middleware.auth_valid:AuthValidator.factory
# this filter is only for use with the experimental v2 API
# [filter:auth_validator_v2]
# paste.filter_factory = sahara.api.middleware.auth_valid:AuthValidatorV2.factory
[filter:auth_validator_v2]
paste.filter_factory = sahara.api.middleware.auth_valid:AuthValidatorV2.factory
[filter:debug]
paste.filter_factory = oslo_middleware.debug:Debug.factory

View File

@ -0,0 +1,9 @@
---
features:
- |
Sahara's APIv2 is now exposed by default (although its state is
still experimental). It has feature parity with Sahara's APIv1.1,
but APIv2 brings better REST semantics, tweaks to some response
payloads, and some other improvements. APIv2 will remain labeled
experimental until it is stabilized following the addition of new
features to it in the coming cycle(s).