~ubuntu-branches/ubuntu/trusty/swift/trusty-updates

« back to all changes in this revision

Viewing changes to doc/source/overview_object_versioning.rst

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Soren Hansen, Chuck Short
  • Date: 2012-09-07 19:02:36 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20120907190236-fqrmbzm7v6zivs8d
Tags: 1.7.0-0ubuntu1
[ Soren Hansen ]
* Update debian/watch to account for symbolically named tarballs and
  use newer URL.
* Run unit tests at build time.
* Fix Launchpad URLs in debian/watch.

[ Chuck Short ]
* New upstream release
* debian/control: Add pubthon-moc as a build dep
* debian/rules: Dont fail if testsuite fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
new object and the data in the ``PUT`` request is saved as the data for the
18
18
versioned object. The new object name (for the previous version) is 
19
19
``<versions_container>/<length><object_name>/<timestamp>``, where ``length``
20
 
is the 2-character zero-padded hexidecimal length of the ``<object_name>`` and
 
20
is the 3-character zero-padded hexidecimal length of the ``<object_name>`` and
21
21
``<timestamp>`` is the timestamp of when the previous version was created.
22
22
 
23
23
A ``GET`` to a versioned object will return the current version of the object
66
66
See a listing of the older versions of the object::
67
67
 
68
68
    curl -i -H "X-Auth-Token: <token>" \
69
 
        http://<storage_url>/versions?prefix=myobject/
 
69
        http://<storage_url>/versions?prefix=008myobject/
70
70
 
71
71
Now delete the current version of the object and see that the older version is
72
72
gone::
74
74
    curl -i -XDELETE -H "X-Auth-Token: <token>" \
75
75
        http://<storage_url>/container/myobject
76
76
    curl -i -H "X-Auth-Token: <token>" \
77
 
        http://<storage_url>/versions?prefix=myobject/
 
77
        http://<storage_url>/versions?prefix=008myobject/