目前支持s3,後期支持swiftgit
python setup.py install
ceph-request --help
create bucket named yuliyanggithub
ceph-request -c ceph-request.cfg -m put -r '/yuliyang'
delete bucket named yuliyangswift
ceph-request -c ceph-request.cfg -m delete -r '/yuliyang'
upload filethis
ceph-request -c ceph-request.cfg -m put -r '/yuliyang/object1' --file 1.txt
upload file from contentcode
ceph-request -c ceph-request.cfg -m put -r '/yuliyang/object1' --content "this is content for object1"
delete objectxml
ceph-request -c ceph-request.cfg -m delete -r '/yuliyang/object1'
get location of bucket named yuliyangget
ceph-request -c ceph-request.cfg -m get -r '/yuliyang?location'
get acl of bucket yuliyangit
ceph-request -c ceph-request.cfg -m get -r '/yuliyang?acl'
set acl for bucket yuliyangio
ceph-request -c ceph-request.cfg -m put -r '/yuliyang?acl' --content '<?xml version="1.0" encoding="UTF-8"?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>admin</ID><DisplayName>admin</DisplayName></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>admin</ID><DisplayName>admin</DisplayName></Grantee><Permission>READ</Permission></Grant></AccessControlList></AccessControlPolicy>'