python rados网关管理api

rgwadmin的Python项目详细描述


rgwadmin

Documentation Status

rgwadmin是一个访问ceph对象存储管理api的python库。

http://docs.ceph.com/docs/master/radosgw/adminops/

API示例用法

fromrgwadminimportRGWAdminrgw=RGWAdmin(access_key='XXX',secret_key='XXX',server='obj.example.com')rgw.create_user(uid='liam',display_name='Liam Monahan',email='liam@umiacs.umd.edu',user_caps='usage=read, write; users=read',max_buckets=1000)rgw.set_user_quota(uid='liam',quota_type='user',max_size_kb=1024*1024,enabled=True)rgw.remove_user(uid='liam',purge_data=True)

用户示例用法

fromrgwadminimportRGWAdmin,RGWUserRGWAdmin.connect(access_key='XXX',secret_key='XXX',server='obj.example.com')u=RGWUser.create(user_id='test',display_name='Test User')u.user_quota.size=1024*1024# in bytesu.user_quota.enabled=Trueu.save()u.delete()

要求

rgwadmin需要以下python包:

如果运行的是python<;2.7,则需要集合的后台端口 订购信息技术。

此外,还需要有一个Ceph对象存储 实例的用户在 要访问的API。见 Ceph Object Storage页了解更多信息 信息。

兼容性

不同版本的ceph-radosgw的api随着时间的推移而改变。而我们 尽可能多的版本兼容ceph-radosgw 随着时间的推移出现的一些问题。我们只考虑LTS版本,但是 这些是我们测试过的。

  • 1.0.5<;=萤火虫
  • 1.0.6>;萤火虫/锤子
  • 1.1>;锤子
  • 1.1.5>;宝石

安装

pip install rgwadmin

许可证

rgwadmin - a Python interface to the Rados Gateway Admin API
Copyright (C) 2015  UMIACS

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Email:
    github@umiacs.umd.edu

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java岩石、布、剪刀程序,带文件输入   java迭代Hashmap中的值列表   数组不能正确循环   JavaHibernate:对于一个遥远的惰性依赖,有一个渴望的获取者吗?   交通阻塞下的java车辆路径选择   如何在java中创建布尔方法来检查添加到具有特定索引的arraylist的对象   java Tomcat配置文件/上下文xml似乎已经崩溃了。请确保它是可分析和有效的。有关详细信息,请参阅服务器日志   为什么坐标有时相等,有时不相等?   java libgdx CameraInputController过于敏感,平移开始得太早   将C++排序函数移植到java   java应该是十进制的   swing Java JFrame中的所有内容都不可见   java使用数组中除一个元素以外的所有元素   从子类运行构造函数的Java