Skip to content

ctriv/perl-Ceph-RadosGW-Admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Ceph::RadosGW::Admin - Bindings for the rados gateway admin api.

VERSION

version 0.4

SYNOPSIS

my $admin = Ceph::RadosGW::Admin->new(
        access_key => 'not really secret',
        secret_key => 'actually secret',
        url        => 'https://your.rados.gateway.com/',
);

my $user  = $admin->create_user(
        uid          => 'myusername',
        display_name => 'my user name',
);

# they're really evil, suspending them should be enough
$user->suspended(1);
$user->save;

# nah, they're really evil
$user->delete;

my $otheruser = $admin->get_user(uid => 'other');

my @keys          = $otheruser->keys();
my @keys_plus_one = $otheruser->create_key();

$otheruser->delete_key(access_key => $keys[0]->{access_key});

my @buckets = $otheruser->get_bucket_info();

DESCRIPTION

This module provides an interface to the Admin OPs interface of a ceph rados gateway. It is at this time incomplete, with only the parts needed by the authors implemented. Patches for the rest of the functionality are encouraged.

METHODS

get_user

Returns a Ceph::RadosGW::Admin::User object representing the given uid.

Dies if the user does not exist.

Example:

my $user = $admin->get_user(uid => 'someuserhere');

create_user

Makes a new user on the rados gateway, and returns a Ceph::RadosGW::Admin::User object representing that user.

Dies on failure.

Example:

my $new_user = $admin->create_user(
        uid          => 'username',
        display_name => 'Our New User',
);

TODO

  • The docs are pretty middling at the moment.

  • This module has only been tested against the Dumpling release of ceph.

AUTHORS

Chris Reinhardt
crein@cpan.org

Mark Ng
cpan@markng.co.uk   

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

perl(1), Admin OPs API Ceph

About

Bindings for the rados gateway admin api.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages