From 991a3995e26bf987a861a70a8ed7f1ad291be3b6 Mon Sep 17 00:00:00 2001 From: Jeremy Freudberg Date: Sun, 3 Dec 2017 03:23:14 +0000 Subject: [PATCH] [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 --- doc/source/contributor/apiv2.rst | 3 +-- etc/sahara/api-paste.ini | 24 +++++++++---------- ...piv2-preview-release-b1ee8cc9b2fb01da.yaml | 9 +++++++ 3 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 releasenotes/notes/apiv2-preview-release-b1ee8cc9b2fb01da.yaml diff --git a/doc/source/contributor/apiv2.rst b/doc/source/contributor/apiv2.rst index 2568bba8c9..5ebe95eb31 100644 --- a/doc/source/contributor/apiv2.rst +++ b/doc/source/contributor/apiv2.rst @@ -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 diff --git a/etc/sahara/api-paste.ini b/etc/sahara/api-paste.ini index 75fb01df6e..54a9762309 100644 --- a/etc/sahara/api-paste.ini +++ b/etc/sahara/api-paste.ini @@ -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 diff --git a/releasenotes/notes/apiv2-preview-release-b1ee8cc9b2fb01da.yaml b/releasenotes/notes/apiv2-preview-release-b1ee8cc9b2fb01da.yaml new file mode 100644 index 0000000000..1299ccc2f9 --- /dev/null +++ b/releasenotes/notes/apiv2-preview-release-b1ee8cc9b2fb01da.yaml @@ -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).