6 Commits

Author SHA1 Message Date
Thiago da Silva
035a411660 versioned writes middleware
Rewrite object versioning as middleware to simplify the PUT method
in the object controller.

The functionality remains basically the
same with the only major difference being the ability to now
version slo manifest files. dlo manifests are still not
supported as part of this patch.

Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>

DocImpact
Change-Id: Ie899290b3312e201979eafefb253d1a60b65b837
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-07 14:11:32 -04:00
Jiangmiao Gao
77e9267916 Fix typing mistake for doc
Change-Id: If3d4e4d44676ef987f584db8cb462ecaed03a019
2015-01-28 22:41:41 +08:00
Shilla Saebi
0dc4b0a7b7 Fix typos in overview_large_objects and versioning doc
Change-Id: I1a919ad1b0298d5817f9eb2caf5e3bd7b3243c2c
2014-11-24 15:35:06 +00:00
Kun Huang
5c3f75ba6a Add x-remove-versions-location for feature: disable versioning
We can set x-versions-location empty to remove this header in API, but
to keep consistent, we should allow x-remove-versions-location too. The
usage is post "x-remove-versions-locaion: x", just like ACL remove
headers.

Fixed: bug #1107592

Change-Id: I1271eec6401d4a0e8c1a7c2d63aeb8dfef00bf6d
2013-03-17 07:30:00 +08:00
John Dickinson
3c82151c44 update object versions docs
Change-Id: I00bf2e20c2683d0440ca425461e0ab87197ee720
2012-08-07 16:26:38 -07:00
John Dickinson
156f27c921 object versioning
Object versioning in swift is implemented by setting a flag on the container
to tell swift to version all objects in the container. The flag is the
``X-Versions-Location`` header on the container, and its value is the
container where the versions are stored.

When data is ``PUT`` into a versioned container (a container with the
versioning flag turned on), the existing data in the file is redirected to a
new object and the data in the ``PUT`` request is saved as the data for the
versioned object. The new object name (for the previous version) is
``<versions_container>/<object_name>/<timestamp>``, where the timestamp is
generated by converting the ``Last-Modified`` header value of the current
version to a unix timestamp.

A ``GET`` to a versioned object will return the current version of the object
without having to do any request redirects or metadata lookups.

Change-Id: I4fcd723145e02bbb2ec1d3ad356713f5dea43b8b
2012-03-28 15:48:43 -05:00