========================= ================================
Revision Description
========================= ================================
-0.6 (Sept 08, 2011) Reply with Merkle hash as the ETag when updating objects.
+0.6 (Sept 12, 2011) Reply with Merkle hash as the ETag when updating objects.
\ Include version id in object replace/change replies.
\ Change conflict (409) replies format to text.
\ Tags should be migrated to a meta value.
+\ Container ``PUT`` updates metadata/policy.
0.5 (July 22, 2011) Object update from another object's data.
\ Support object truncate.
\ Create object using a standard HTML form.
* ``versioning``: Set to ``auto``, ``manual`` or ``none`` (default is ``manual``)
* ``quota``: Size limit in KB (default is ``0`` - unlimited)
-
+
+If the container already exists, the operation is equal to a ``POST`` with ``update`` defined.
+
================ ===============================
Return Code Description
================ ===============================
except NameError:
ret = 202
- if len(meta) > 0:
+ if ret == 202 and policy:
try:
- backend.update_container_meta(request.user, v_account, v_container, meta, replace=True)
+ backend.update_container_policy(request.user, v_account, v_container, policy, replace=False)
+ except NotAllowedError:
+ raise Unauthorized('Access denied')
+ except NameError:
+ raise ItemNotFound('Container does not exist')
+ except ValueError:
+ raise BadRequest('Invalid policy header')
+ if meta:
+ try:
+ backend.update_container_meta(request.user, v_account, v_container, meta, replace=False)
except NotAllowedError:
raise Unauthorized('Access denied')
except NameError: