您的位置:首页 > 产品设计 > UI/UE

ceph-request 工具箱开发

2016-11-05 00:00 411 查看
https://github.com/wzyuliyang/ceph-request

目前支持s3,后期支持swift

INSTALL

python setup.py install

HOW

ceph-request --help

create bucket named yuliyang

ceph-request -c ceph-request.cfg -m put -r '/yuliyang'

delete bucket named yuliyang

ceph-request -c ceph-request.cfg -m delete -r '/yuliyang'

upload file

ceph-request -c ceph-request.cfg -m put -r '/yuliyang/object1' --file 1.txt

upload file from content

ceph-request -c ceph-request.cfg -m put -r '/yuliyang/object1' --content "this is content for object1"

delete object

ceph-request -c ceph-request.cfg -m delete -r '/yuliyang/object1'

get location of bucket named yuliyang

ceph-request -c ceph-request.cfg -m get -r '/yuliyang?location'

get acl of bucket yuliyang

ceph-request -c ceph-request.cfg -m get -r '/yuliyang?acl'

set acl for bucket yuliyang

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>'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ceph radosgw
相关文章推荐