From: Odintsov Vladislav <VlOdintsov@croc.ru>
To: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: [rgw] hammer bucket object versions
Date: Mon, 20 Jun 2016 16:58:04 +0000 [thread overview]
Message-ID: <1466441877817.58217@croc.ru> (raw)
In-Reply-To: <dbde742b69564ec797c8d52355759901@MBX1.croc.ru>
Hi all,
I see in the documentation, that in hammer bucket object versioning is unsupported.
http://docs.ceph.com/docs/hammer/radosgw/s3/#features-support
But, if I use boto with hammer-based ceph s3 cluster, it seems, that it works:
>>> import boto.s3.connection
>>> conn = boto.s3.connection.S3Connection(aws_access_key_id=access_key,
... aws_secret_access_key=secret_key,
... host=host, port=port,
... validate_certs=validate_certs,
... is_secure=is_secure, debug=debug,
... suppress_consec_slashes=suppress_consec_slashes,
... calling_format=boto.s3.connection.OrdinaryCallingFormat()
... )
>>> bucket = conn.create_bucket("test_bucket2")
>>> bucket.configure_versioning(True)
>>> key = bucket.new_key("versioned_object")
>>> key.set_contents_from_string("Version 1")
9
>>> key.set_contents_from_string("Version 2")
9
>>> for k in bucket.list_versions('versioned_object'):
... k.version_id
...
u'2cCJJQBE7XHz7OSxk3ZvH6DNh5Q6vOi'
u'I51r-J5NpQ44TZI.iRwyukBZ5NOyriO'
>>> for k in bucket.list_versions('versioned_object'):
... k.get_contents_as_string()
...
'Version 2'
'Version 1'
>>> bucket.get_key('versioned_object').get_contents_as_string()
'Version 2'
>>> bucket.copy_key(new_key_name='versioned_object', src_bucket_name='test_bucket2', src_key_name='versioned_object', src_version_id='I51r-J5NpQ44TZI.iRwyukBZ5NOyriO')
<Key: test_bucket2,versioned_object>
>>> bucket.get_key('versioned_object').get_contents_as_string()
'Version 1'
>>> list(bucket.list_versions('versioned_object'))
[<Key: test_bucket2,versioned_object>, <Key: test_bucket2,versioned_object>, <Key: test_bucket2,versioned_object>]
I'd like to clarify, is it non-production ready in hammer, or it's a documentation error?
Regards,
Vladislav Odintsov
next parent reply other threads:[~2016-06-20 17:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <dbde742b69564ec797c8d52355759901@MBX1.croc.ru>
2016-06-20 16:58 ` Odintsov Vladislav [this message]
2016-06-21 9:56 ` [rgw] hammer bucket object versions Orit Wasserman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466441877817.58217@croc.ru \
--to=vlodintsov@croc.ru \
--cc=ceph-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.