Pump freezer-api to v2

* Deprecate v1
 * Set v2 to current
 * set enable_v1_api default value to False

Depends-On: Ib82dbda3a3207ac0d5f4137c99453e142eee2be3
Change-Id: I838fdef0cb9533e94c217500117eb7b5374f91b4
This commit is contained in:
Saad Zaher 2018-02-21 13:20:55 +00:00
parent 84fa303f68
commit d9f9579317
6 changed files with 68 additions and 7 deletions

View File

@ -25,8 +25,8 @@ from freezer_api.api.v1 import sessions
VERSION = {
'id': 'v1',
'status': 'CURRENT',
'updated': '2015-03-23T13:45:00',
'status': 'DEPRECATED',
'updated': '2018-02-21T13:30:00',
'links': [
{
'href': '{0}v1/',

View File

@ -25,8 +25,8 @@ from freezer_api.api.v2 import sessions
VERSION = {
'id': 'v2',
'status': 'EXPERIMENTAL',
'updated': '2017-04-21T17:00:00',
'status': 'CURRENT',
'updated': '2018-02-21T13:30:00',
'links': [
{
'href': '{0}v2/',

View File

@ -60,7 +60,7 @@ def api_common_opts():
help='Port number to listen on. Default is 9090'
),
cfg.BoolOpt('enable_v1_api',
default=True,
default=False,
help="""Deploy the v1 OpenStack Freezer API.
When this option is set to ``True``, Freezer-api service will respond to
requests on registered endpoints conforming to the v1 OpenStack Freezer API.

View File

@ -21,7 +21,6 @@ import json
import falcon
import mock
from freezer_api.api import v1
from freezer_api.api import v2
from freezer_api.api import versions
from freezer_api.tests.unit import common
@ -38,5 +37,5 @@ class TestVersionResource(common.FreezerBaseTestCase):
def test_on_get_return_versions(self):
self.resource.on_get(self.req, self.req)
self.assertEqual(self.req.status, falcon.HTTP_300)
expected_result = json.dumps({'versions': [v2.VERSION, v1.VERSION]})
expected_result = json.dumps({'versions': [v2.VERSION]})
self.assertEqual(self.req.data, expected_result)

View File

@ -0,0 +1,33 @@
---
prelude: >
Currently freezer-api v1 is the default api version to be used in different
freezer components. Freezer-api v1 doesn't support multi-tenancy and will
be a blocker to support sqlalchemy. Freezer-api v2 was already implement and
was being use as `experimental`.
Freezer api v1 will be disabled by default in gate jobs
features:
- |
Fixed some minor bugs in freezer-api v2.
Set freezer-api version 2 to stable and use it as the current version.
The default behaviour of freezer now is to support multi-tenancy!
All tempest tests are running against freezer api v2
issues:
- |
No Backward compitibility support!
deprecations:
- |
Freezer api version 1 is deprecated and will be out of support end of Rocky
release, to be removed in future releases!.
critical:
- |
All Freezer mappings needs to be upgraded to reflect project_id.
Now smooth upgrade facility is provided!
fixes:
- |
Delete Backups using freezer-api v2

View File

@ -0,0 +1,29 @@
---
prelude: >
Currently freezer-api supports only elasticsearch as database engine.
Elasticsearch is adding complexity in deploying and running freezer, the
need and planning to move to sqlalchemy has been a moving target since Pike.
Now freezer-api should be able to support sqlalchemy, it's still under
development, so not fully supported yet. There is work in progress to unify
the database api so freezer can support more than one database driver at
the same time.
features:
- |
Freezer support for sqlalchemy in development.
freezer-manage fully supports sqlalchemy database now!
issues:
- |
No Backward compitibility support!
sqlalchemy will be only supported for freezer api version 2
critical:
- |
Freezer api version 1 is broken and won't be supported!
fixes:
- |
Fixed remove mappings in freezer-manage as elasticsearch removed this
feature, so now we have to delete the index not individual mappings!