summaryrefslogtreecommitdiff
path: root/openstackclient/api
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/api')
-rw-r--r--openstackclient/api/object_store_v1.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/openstackclient/api/object_store_v1.py b/openstackclient/api/object_store_v1.py
index b47f556b..c870332a 100644
--- a/openstackclient/api/object_store_v1.py
+++ b/openstackclient/api/object_store_v1.py
@@ -366,6 +366,46 @@ class APIv1(api.BaseAPI):
for chunk in response.iter_content():
f.write(chunk)
+ def object_set(
+ self,
+ container,
+ object,
+ properties,
+ ):
+ """Set object properties
+
+ :param string container:
+ container name for object to modify
+ :param string object:
+ name of object to modify
+ :param dict properties:
+ properties to add or update for the container
+ """
+
+ headers = self._set_properties(properties, 'X-Object-Meta-%s')
+ if headers:
+ self.create("%s/%s" % (container, object), headers=headers)
+
+ def object_unset(
+ self,
+ container,
+ object,
+ properties,
+ ):
+ """Unset object properties
+
+ :param string container:
+ container name for object to modify
+ :param string object:
+ name of object to modify
+ :param dict properties:
+ properties to remove from the object
+ """
+
+ headers = self._unset_properties(properties, 'X-Remove-Object-Meta-%s')
+ if headers:
+ self.create("%s/%s" % (container, object), headers=headers)
+
def object_show(
self,
container=None,