Merge "Follow up on share replica metadata changes"
This commit is contained in:
@@ -260,4 +260,3 @@ Request
|
||||
- project_id: project_id_path
|
||||
- share_replica_id: share_replica_id_path
|
||||
- key: metadata_key_path
|
||||
```
|
||||
@@ -178,7 +178,7 @@ class ShareReplicationController(wsgi.Controller, metadata.MetadataController,
|
||||
def create(self, req, body): # pylint: disable=function-redefined # noqa F811
|
||||
return self._create(req, body)
|
||||
|
||||
@wsgi.Controller.api_version("2.67") # noqa
|
||||
@wsgi.Controller.api_version("2.67", "2.94") # noqa
|
||||
@wsgi.response(202)
|
||||
def create(self, req, body): # pylint: disable=function-redefined # noqa F811
|
||||
return self._create(req, body, allow_scheduler_hints=True)
|
||||
|
||||
@@ -1832,12 +1832,16 @@ def share_replica_metadata_update(context, share_replica_id,
|
||||
metadata, delete)
|
||||
|
||||
|
||||
@require_context
|
||||
@require_share_instance_exists
|
||||
@context_manager.writer
|
||||
def share_replica_metadata_update_item(context, share_replica_id, item):
|
||||
return _share_replica_metadata_update(context, share_replica_id,
|
||||
item, delete=False)
|
||||
|
||||
|
||||
@require_context
|
||||
@require_share_instance_exists
|
||||
@context_manager.reader
|
||||
def share_replica_metadata_get_item(context, share_replica_id, key):
|
||||
|
||||
@@ -1898,7 +1902,7 @@ def _share_replica_metadata_update(context, share_replica_id,
|
||||
if metadata is None:
|
||||
metadata = {}
|
||||
|
||||
# Fetch all existing metadata once
|
||||
# Fetch all existing metadata once
|
||||
existing_meta = {
|
||||
m.key: m for m in _share_replica_metadata_get_query(
|
||||
context, share_replica_id
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds share replica metadata capabilities inlcuding, create,
|
||||
Adds share replica metadata capabilities including, create,
|
||||
update all, update single, show, and delete metadata.
|
||||
|
||||
Reference in New Issue
Block a user