summaryrefslogtreecommitdiff
path: root/trove/cluster
diff options
context:
space:
mode:
authorzhanggang <zhanggang@cmss.chinamobile.com>2018-07-16 11:27:34 +0800
committerzhanggang <zhanggang@cmss.chinamobile.com>2018-07-17 15:14:11 +0800
commit474b0b3aaa6a46f5d000822c7c3fc38ad16fbd06 (patch)
tree0cb9604740534da68714bc6d1d29d444852378dc /trove/cluster
parent87fd1c4b0ec1f0788c0e0478acf80e7e280c16a4 (diff)
downloadtrove-474b0b3aaa6a46f5d000822c7c3fc38ad16fbd06.tar.gz
Sync the data fields of DB* class and table fields.
This update try to fix some problems: 1. define the 'id' both in _data_fields and _auto_generated_attrs. 2. some of tables don't have the 'id' field. 3. _data_fields of DBInstance miss some table fields. 4. Change the key of persisted_models as the same of table name to make it more readable. Change-Id: I0ad96824e8de978ff5b6766085549b1e1a2509cf Signed-off-by: zhanggang <zhanggang@cmss.chinamobile.com>
Diffstat (limited to 'trove/cluster')
-rw-r--r--trove/cluster/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/trove/cluster/models.py b/trove/cluster/models.py
index a79f6c04..27caacec 100644
--- a/trove/cluster/models.py
+++ b/trove/cluster/models.py
@@ -59,9 +59,10 @@ def persisted_models():
class DBCluster(dbmodels.DatabaseModelBase):
- _data_fields = ['id', 'created', 'updated', 'name', 'task_id',
+ _data_fields = ['created', 'updated', 'name', 'task_id',
'tenant_id', 'datastore_version_id', 'deleted',
'deleted_at', 'configuration_id']
+ _table_name = 'clusters'
def __init__(self, task_status, **kwargs):
"""