MCPcopy Index your code
hub / github.com/UMIACS/rgwadmin

github.com/UMIACS/rgwadmin @2.4.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.4.5 ↗ · + Follow
146 symbols 487 edges 11 files 44 documented · 30% updated 2y ago2.4.5 · 2024-01-05★ 90
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

rgwadmin

Documentation Status

rgwadmin is a Python library to access the Ceph Object Storage Admin API.

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

API Example Usage

from rgwadmin import RGWAdmin

rgw = 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)

User Example Usage

from rgwadmin import RGWAdmin, RGWUser

RGWAdmin.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 bytes
u.user_quota.enabled = True
u.save()
u.delete()

Requirements

rgwadmin requires the following Python packages:

Additionally, you need to have a Ceph Object Storage instance with a user that has appropriate caps (capabilities) on the parts of the API that you want to access. See the Ceph Object Storage page for more information.

Version 2.3.1 was the last to support Python 2. As of version 2.4.0 we support using V4 signing for requests to the Ceph RGW Admin server only.

Compatibility

rgwadmin implements all documented Admin API operations or recent versions of Ceph. We also implement some of the undocumented ones, too...

Installation

pip install rgwadmin

License

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

Core symbols most depended-on inside this repo

request
called by 25
rgwadmin/rgw.py
get_metadata
called by 12
rgwadmin/rgw.py
id_generator
called by 11
rgwadmin/utils.py
get_connection
called by 7
rgwadmin/rgw.py
modify_user
called by 6
rgwadmin/rgw.py
create_bucket
called by 6
test/__init__.py
_request_metadata
called by 5
rgwadmin/rgw.py
create_user
called by 5
rgwadmin/rgw.py

Shape

Method 104
Class 38
Function 4

Languages

Python100%

Modules by API surface

rgwadmin/rgw.py47 symbols
rgwadmin/user.py39 symbols
rgwadmin/exceptions.py28 symbols
test/test_rgw.py14 symbols
test/test_metadata.py9 symbols
test/test_user.py5 symbols
rgwadmin/utils.py3 symbols
test/__init__.py1 symbols

For agents

$ claude mcp add rgwadmin \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page