Commit Graph

23 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
wangqi ffb4c61000 correct spelling error with word 'databse'
Change-Id: I5e9b5200dec28b542bf84c6204c4766742748d73
2018-03-01 14:13:10 +00:00
Saad Zaher 1cde8eef34 Use API V2 driver as default db driver
Change-Id: I83000f8bf39eed41d067ed663de9f459439eca9a
2018-02-16 14:17:11 +00: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
Saad Zaher 528f3234e9 Allow using different database backends
Abstract storage configuration section to load different database
backend drivers. so we can keep supporting elasticsearch for
a while after moving to oslo.db also this will help in adding
API v2 as the elasticsearch driver will be changed.

Each db driver will register it's configuration on the run time.

Change-Id: Ie861e569f4add783c6f580cd0c08ed0fb3440151
2017-03-15 19:20:56 +00:00
Partha Bera 3bc0135d48 Remove default=None for config options
In the cfg module default=None is set as the
default value. It's not necessary to set it
again when defining config options.

Change-Id: Ib52c4e3c570b444cb79af65d1fa8025545578ab1
Closes-bug: #1323975
2016-12-29 11:57:21 +05:30
Ruslan Aliev cf95fa1e86 Add full pep8 check
This patch adds full pep8 check support. All code style problems
is fixed.

Closes-Bug: #1646103
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: I1fce70a1b4e4c70379fc3876f85170b06a044059
2016-12-05 19:57:32 +04:00
vnogin d963673bdc Change default value of elasticsearch replicas
After executing "freezer-scheduler register" we face problem that
all shards failed in elasticsearch (ES).

If we use number of replicas "0" according to ES documentation
for one node installation then this issue disappeared.

After "first use" of freezer tool cloud engineer can add
additional ES nodes to cluster and fine tune this value
in configuration file.

Change-Id: I4f2a6562358aefb6244f8d0590a9f138db19a925
2016-09-28 14:18:49 +01:00
Domhnall Walsh 65cde89ac0 Fixes 'ElastichSearch' typo -> 'ElasticSearch' in freezer-api
Change-Id: Idb8c17032bb231f5cd6a8d4aaafdbd7aa2b2fbac
Closes-Bug: #1600750
2016-07-11 11:08:03 +01:00
Saad Zaher cf688c006a Fix oslo.config to load elk opts from the config file
Elk loads the configuration from the right place now and won't use
the default configuration

Change-Id: Ia439f5c76037251a1b8e41030b1ef6c8fea9c485
Closes-Bug: #1569996
2016-04-14 10:08:39 +00:00
Saad Zaher 153279105e Adding storage, keystone_authtoken sections to sample config
Added storage section for elk config and keystone_authtoken section
for keystone related configurations

Change-Id: Iba3e1c97bfd58fb39c6f9208e31014dde8658f2f
Closes-Bug: #1565737
2016-04-04 17:27:29 +01:00
Fausto Marzi 8d220b56a7 Switch to testr from pytest
Align to the other Openstack project and
use testr instead of pytest

Includes:
    - pylint and pep8 fixes.
    - py34 compliance
    - requirements updated
    - updated path to dsvm gate job

Change-Id: I10a5ea8d581029eba8f3ab5e016a1dd1919fa117
Depends-On: I4f9050cd551e87d2e398b6f94dc904154d0b1b13
2016-02-28 10:37:21 +00:00
memo dfa9598545 Updated LICENSE file and headers
removed unnecesary header in license
added missing header in files

Change-Id: Iea79505307479541de01231dd25c3821e9e8999c
2015-11-09 16:13:30 +00:00
Fabrizio Vanni 4deb7ead04 config options for elasticsearch connection
Add support for options to be passed the the elasticsearch connection

The following options are supported in the freezer-api.conf file:

  hosts='http://localhost:9200'
  use_ssl=False
  ca_certs=''
  use_ssl=False
  timeout=60
  retries=20

The provided values are the respective defaults.

Implements blueprint: api-conf-db-options

Change-Id: I373503bf845d0ac8091c83280ac21611d30d1a07
2015-09-09 18:58:02 +01:00
Fausto Marzi 2eac8baa06 Updating HP Copyright label
Change-Id: I02ac370b1d791a33be88e245c9bea56d8630a37a
2015-08-21 14:22:26 +01:00
Fausto Marzi 4eda863997 Fixed pep8 failure
Few pep8 failure are now fixed.
2015-08-02 19:07:50 +01:00
Fabrizio Vanni 60b6f60d89 fix i18n related to the api
some imports were incorrect

Introduce an integration module for i18n, as suggested in:

http://docs.openstack.org/developer/oslo.i18n/usage.html

Change-Id: Iefbe56cda42120d0c58b4b331f58108ad4f9515a
2015-07-31 13:28:08 +00:00
Erno Kuvaja 7a571cb13d Refactoring logging and translations on freezer_api
Refactoring logging to use oslo.log to have standard OpenStack logging.
Refactoring log messages to enable i18n translations.
Refactoring Exception messages to enable i18n translations.

New requirement oslo.log.

Change-Id: I68850f9236f228c2ba99db2c3f3fb3a412f5ee4c
2015-07-30 19:45:42 +01:00
Erno Kuvaja 1e22e01a79 Refactor api imports to OpenStack Hacking compliant
http://docs.openstack.org/developer/hacking/

Change-Id: I533c7d075c55d019d55990ea9e9053db920fda45
2015-07-30 12:03:50 +00:00
Fabrizio Vanni 8b1e30c3b5 update oslo namespace to oslo_config
import of oslo.config has been deprecated in favor
of oslo_config

Change-Id: Ieccca45eef9c26eb48ad0743a9917b3302d1d7d9
2015-07-29 17:46:49 +01:00
Fabrizio Vanni 3a9b0005a0 Fix stale import in freezer_api/storage/driver.py
freezer_api/storage/driver.py has a stale import

the referenced file is simpledict.py which is not
needed anymore and has been removed

Change-Id: Iaa97f7a4efaa6bbc97ef8fa5566d5c5a55d2a11f
Closes-Bug: #1457158
2015-05-20 18:34:06 +01:00
Fabrizio Vanni c86f04978e freezer api support for client registration
Adds an endpoint to the api for the registration of freezer clients

Change-Id: I1ca2a5e0021d383df70dfd001ab12967714c35bc
Implements: blueprint freezerclient-registration
2015-04-30 14:07:19 +01:00
Fabrizio Vanni acbc7aefae Freezer API
First implementation of the freezer API.
Slightly more than a skeleton with basic functionality

Change-Id: Iae04affea3aa0f4a943599b528df49d9d4a5b845
Implements: blueprint freezer-api-first-rel
2015-04-08 18:25:45 +01:00