您好,登錄后才能下訂單哦!
這篇文章將為大家詳細講解有關(guān)ceph-request工具箱開發(fā)的示例代碼,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
python setup.py install
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>'
關(guān)于“ceph-request工具箱開發(fā)的示例代碼”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。