diff options
author | Lingxian Kong <anlin.kong@gmail.com> | 2020-11-17 15:47:34 +1300 |
---|---|---|
committer | Lingxian Kong <anlin.kong@gmail.com> | 2020-11-18 22:33:12 +1300 |
commit | 051cdbe08c03280cb6808010ade88f058011f2ab (patch) | |
tree | 2c74903f7a37f2d542e8c4e13c050b27949e9e6e /trove/datastore | |
parent | 33c0b640517e290821641ffd16df561517f10ed8 (diff) | |
download | trove-051cdbe08c03280cb6808010ade88f058011f2ab.tar.gz |
Update datastore version name
Story: 2008358
Task: 41264
Change-Id: I5b0bb30c1cf7274bf8cff14b377dea5508e3974d
Diffstat (limited to 'trove/datastore')
-rw-r--r-- | trove/datastore/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/trove/datastore/models.py b/trove/datastore/models.py index 5f79dea9..bf1b8903 100644 --- a/trove/datastore/models.py +++ b/trove/datastore/models.py @@ -588,7 +588,7 @@ def update_datastore(name, default_version): def update_datastore_version(datastore, name, manager, image_id, image_tags, - packages, active, version=None): + packages, active, version=None, new_name=None): """Create or update datastore version.""" version = version or name db_api.configure_db(CONF) @@ -601,9 +601,9 @@ def update_datastore_version(datastore, name, manager, image_id, image_tags, # Create a new one ds_version = DBDatastoreVersion() ds_version.id = utils.generate_uuid() - ds_version.name = name ds_version.version = version ds_version.datastore_id = datastore.id + ds_version.name = new_name or name ds_version.manager = manager ds_version.image_id = image_id ds_version.image_tags = (",".join(image_tags) |