Commit Graph

7 Commits

Author SHA1 Message Date
gengchc2 857c239e97 Remove redundant code and improve test coverage
storage/driver.py is redundant file
get_opts in elasticsearchv2.py is redundant

Change-Id: I2c6d892016508c21fbc782d1628136618342c21f
2019-01-08 05:29:23 +00:00
gengchc2 df5cca26bb Delete invalid codes and Add a unit test for elastic
1.In _validate_opts:
The following code is True forever, We will delete it.
2. Add unit test for ca_certs in _validate_opts.

Change-Id: I25a9a4aaae6fd5677d07d376f66188dc0b92bc3b
2018-12-28 22:07:28 -08:00
Zuul d8c128ac4e Merge "Part 1: Implement Sqlalchemy driver for freezer-api" 2018-02-20 14:50:16 +00:00
Saad Zaher c5ca51b2c4 Fix order of arguments passed to elasticsearch
Needed-By: I93ed1b909f538728a1a9bd5c8b07baf7aeddb705
Needed-By: Ic24cab11290b6f4a292ba4fc085fb749b26bb93a
Change-Id: I81e417155da48f46dd2113e5745fb3c21c96499f
Closes-Bug: #1750350
2018-02-19 21:16:25 +00:00
Saad Zaher d8e0dc21e0 Part 1: Implement Sqlalchemy driver for freezer-api
Add support to oslo.db to be used as a DB driver. The DB driver will be
used with API v2. When it's completely implemented, API V1 will be
deprecated and removed by the end of the cycle. Freezer-api will keep
supporting V2 with Elasticsearch, Sqlalchemy drivers.

This patch implements the follow:
    * Abstract Base DB driver to be implemented by each driver
    * Base driver; will return only access to the db engine, session
    * SqlAlchemy driver;
    * ElasticSearch driver;
    * Implement both drivers in freezer-manage

Partially-Implements: blueprint oslo-db

Depends-On: I81e417155da48f46dd2113e5745fb3c21c96499f
Depends-On: I2e5724b1f1a75121952e2beb3844d2c489e4df68
Depends-On: Idb4ac050652d1d0107bf3fcd447d7cbedd811809
Depends-On: I81d46c89859752c0cbc21ef02de90db7f19f942c
Change-Id: I93ed1b909f538728a1a9bd5c8b07baf7aeddb705
2018-02-19 11:12:38 +00:00
Mohammed Naser e0976af072
Allow bootstrapping against clusters and unify host options
The current settings inside freezer-manage reflect on using host and
port which are no longer used.  In addition, there seems to be no
splitting of the values in freezer-manage which means that it would
create a problem when trying to install against a list of hosts as
the ElasticSearch driver will refuse to accept the list.

This patch unifies all references of to 'hosts' and changes the option
to use ListOpt which is comma seperated values in the configuration
file which are then split into an array by oslo.config, which avoids
having to split things inside freezer.

Closes-Bug: #1681931

Change-Id: I613d0672ec2b186cd0d6365e795b35d9cff26dcd
2017-04-13 15:13:59 -04:00
Saad Zaher 49e934d589 Implement API v2 with fully support Mutli-tenancy
Added Freezer API V2 which supports mainly multitenancy
Added a new database driver to support project_id parameter.
API v2 will be in development status till the end of pike
API v1 will be deprecated by end of Pike
oslo.db patch will be based on API v2

Implements blueprint api-v2-multi-tenancy
Signed-off-by: Saad Zaher <eng.szaher@gmail.com>

Change-Id: I2791246b7d6dc6c91427af45c0930e5d334a4861
2017-04-10 10:48:55 +00:00