Commit Graph

14 Commits

Author SHA1 Message Date
Michal Arbet 2a283bf34a Fix freezer-api's src_file to path_to_backup
Freezer-api is not working as it is expected, returning NULL value
for src_file option in freezer_action's json returned from API.

In other words when user define action via freezer client and define
valid and WORKING action JSON with option path_to_backup
(src_file is not supported by freezer-agent anymore).

In DB we can see backup_metadata is filled correctly,
freezer-scheduler/freezer-agent working correctly as they are reading
backup_metadata. Problem is that API is still returning json with
src_file set tu NULL because src_file is not present in backup_metada,
therefore is not filled in src_file column in action table.

Src_file option was changed to path_to_backup in freezer git repository
below, but API was never changed, this patch is fixing this behaviour.

Freezer's change :
c7f71ff70b

Doc changes in freezer:
https://review.opendev.org/#/c/705003/

Change-Id: I9e74910bd0ff4ad18b830c26ce90770b0dfa107b
2020-01-31 11:45:39 +01:00
gecong1973 b52291b7e6 Modify mode field in action table for sqlite
The mode field is reserved word in sqlite, the patch
change it to actionmode

Change-Id: Ia9ad6e312562c260424134251600b6d100182ac0
2019-03-28 17:59:22 -07:00
gengchc2 5e60886b08 Fix session_tag type in job table
Change-Id: I5ba130cb7c54c4999ec8985d90c567336b8c4a68
2019-02-14 18:03:29 -08:00
gengchc2 758830ac6a Correct session_tag field type error
Change-Id: I2d3cb8e62b02a538496eee5f5c5a76be4947795b
2018-11-12 17:59:44 -08:00
gecong1973 944e16bc10 Fix tempest failure in sqlalchemy driver
Tempest will be added for sqlalchemy driver,
there are some faliures, the patch fix it

Change-Id: I9c95a44e49fcfe967aa476f443a87d4798fb3e11
2018-11-08 22:45:06 -08:00
gecong1973 fc701f90f3 add api version v1 support for sql driver
currently, sqlachemy driver of freezer-api only
support api version 2, the patch add v1 version
support

Change-Id: I2608b1152ee3e03409f0321221b1aa8efe3d3d33
2018-11-01 00:23:24 -07:00
gecong1973 aacbe8a128 Add backup table for bp add-mysql-support-for-freezer
Add backup table in v2.
The other tables,api and test will be added in following patch.

ref: https://storyboard.openstack.org/#!/story/2004132

Story: #2004132
Task: #27578

Change-Id: Iff6628fb8de4bf0481f0f73cc70a6d33512516ff
Implements: bp add-mysql-support-for-freezer
2018-10-25 01:48:15 -07:00
gengchc2 796c41ac7d Add jobs table for bp add-mysql-support-for-freezer
Add jobs table in v2.
The other tables,api and test will be added in following patch.

ref: https://storyboard.openstack.org/#!/story/2004132

Story: #2004132
Task: #27578

Change-Id: Id9a182f7b699f8079cdf31ded8c2ca6e7d26078a
Implements: bp add-mysql-support-for-freezer
2018-10-25 06:35:47 +00:00
gecong1973 83d199694c Add session table for bp add-mysql-support-for-freezer
Add session table in v2.
The other tables,api and test will be added in following patch.

ref: https://storyboard.openstack.org/#!/story/2004132

Story: #2004132
Task: #27578

Change-Id: I178556a0d9f26e0b0dc0c64f02e8fd73a82ea432
Implements: bp add-mysql-support-for-freezer
2018-10-24 23:00:59 -07:00
gecong1973 8c63de54e9 Add action table for bp add-mysql-support-for-freezer
Add table action and ActionReport in v2.
The other tables,api and test will be added in following patch.

ref: https://storyboard.openstack.org/#!/story/2004132

Story: #2004132
Task: #27578

Change-Id: Idafc9d9c26540735fe8a4ddb24af1f09964d3846
Implements: bp add-mysql-support-for-freezer
2018-10-25 02:55:05 +00:00
gecong1973 93a000a514 Change config_id to client_id in clients table
config_id is actually client_id, this patch modify it

Story: #2004132
Task: #27578

Change-Id: Ie561b1d2cfbc783bd74af4e0c4d3d13b7b45be22
Implements: bp add-mysql-support-for-freezer
2018-10-25 01:26:22 +00:00
gecong1973 522e55af8c Add clients table for bp add-mysql-support-for-freezer
Add clients table in v2.
The other tables,api and test will be added in following patch.

ref: https://storyboard.openstack.org/#!/story/2004132

Story: #2004132
Task: #27578

Change-Id: Ie99059b369b6036de7fa36473651b725a60728c3
Implements: bp add-mysql-support-for-freezer
2018-10-23 20:47:20 -07: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
Dmitry Stepanenko fac6dca139 Introducing models for oslo.db
Implemented Client, Action, Job,
Session, ActionAttachment,
ActionReport, JobAttachment classes
which are associated with database
tables and allows working with them
using orm.

Implements: blueprint oslo-db

Change-Id: I768bb580882b1dd86c5d8553e5fec8e4a44eae33
2017-04-10 18:46:20 +04:00