Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ceph-admin-ops-client

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ceph-admin-ops-client

A wrapper for Ceph Object Gateway's Admin Ops API

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

Ceph Object Gateway AdminOps API client

This module contains a Node.js wrapper around the HTTP API of Ceph Object Gateway's Admin Ops API.

Installation

The module can be installed via

npm install ceph-admin-ops-client --save

Basic usage

As a minimum, the accessKey, secretKey, host and port properties need to be set when using this module. Each method returns a promise.

Setup

var AdminOpsAPI = require("ceph-admin-ops-client");

var api = new AdminOpsAPI({
    accessKey: "<<ACCESS_KEY>>",
    secretKey: "<<SECRET_KEY>>",
    host: "192.168.0.100",
    port: 10000
});

Sample method call:

api.getUserInfo({ uid: "myUser" }).then(function(userInfo){
    console.log(JSON.stringify(userInfo));
}).catch(function(error) {
    console.log(JSON.stringify(error));
});

Configuration properties

  • accessKey: The access key with which the API shall be used.
  • secretKey: The secret key with which the API shall be used.
  • host: Either the IP address or the hostname of the Ceph Object Gateway endpoint (default is s3.amazonaws.com).
  • port: The port of the Ceph Object Gateway endpoint (default is 80).
  • protocol: Either http or https (default is http).
  • useSubdomain: If a subdomain shall be used (boolean). Ddefault is false.
  • adminBucket: The name of the "admin bucket" (the URI which is configured for the base admin endpoint). Default is admin.
  • expiresInMinutes: The time in minutes until the request expires (default is 10).

Methods

The parameters argument for the methods (see below) is an object containing a property map, for example

{
    "uid": "myUser",
    "bucket": "myBucket"
}

getUsage(parameters)

Request bandwidth usage information.

ParameterData TypeMandatory?
uidstringNo
startdateNo
enddateNo
show-entriesbooleanNo
show-summarybooleanNo

trimUsage(parameters)

Remove usage information. With no dates specified, removes all usage information.

ParameterData TypeMandatory?
uidstringNo
startdateNo
enddateNo
remove-allbooleanNo
show-summarybooleanNo

getUserInfo(parameters)

Get user information. If no user is specified returns the list of all users along with suspension information.

ParameterData TypeMandatory?
uidstringYes

createUser(parameters)

Create a new user. By Default, a S3 key pair will be created automatically and returned in the response. If only one of access-key or secret-key is provided, the omitted key will be automatically generated. By default, a generated key is added to the keyring without replacing an existing key pair. If access-key is specified and refers to an existing key owned by the user then it will be modified.

ParameterData TypeMandatory?
uidstringYes
display-namestringYes
emailstringNo
key-typestringNo
access-keystringNo
secret-keystringNo
user-capsstringNo
generate-keybooleanNo
max-bucketsnumberNo
suspendedbooleanNo

updateUser(parameters)

Modify a user.

ParameterData TypeMandatory?
uidstringYes
display-namestringNo
emailstringNo
key-typestringNo
access-keystringNo
secret-keystringNo
user-capsstringNo
generate-keybooleanNo
max-bucketsnumberNo
suspendedbooleanNo

deleteUser(parameters)

Remove an existing user.

ParameterData TypeMandatory?
uidstringYes
purge-databooleanNo

createSubUser(parameters)

Create a new subuser (primarily useful for clients using the Swift API). Note that either gen-subuser or subuser is required for a valid request. Note that in general for a subuser to be useful, it must be granted permissions by specifying access. As with user creation if subuser is specified without secret, then a secret key will be automatically generated.

ParameterData TypeMandatory?
uidstringYes
subuserstringNo
key-typestringNo
secret-keystringNo
accessstringNo
generate-secretbooleanNo

updateSubUser(parameters)

Modify an existing subuser

ParameterData TypeMandatory?
uidstringYes
subuserstringYes
key-typestringNo
secret-keystringNo
accessstringNo
generate-secretbooleanNo

deleteSubUser(parameters)

Remove an existing subuser

ParameterData TypeMandatory?
uidstringYes
subuserstringYes
purge-keysbooleanNo

createKey(parameters)

Create a new key. If a subuser is specified then by default created keys will be swift type. If only one of access-key or secret-key is provided the committed key will be automatically generated, that is if only secret-key is specified then access-key will be automatically generated. By default, a generated key is added to the keyring without replacing an existing key pair. If access-key is specified and refers to an existing key owned by the user then it will be modified. The response is a container listing all keys of the same type as the key created. Note that when creating a swift key, specifying the option access-key will have no effect. Additionally, only one swift key may be held by each user or subuser.

ParameterData TypeMandatory?
uidstringYes
subuserstringNo
key-typestringNo
access-keystringNo
secret-keystringNo
generate-keybooleanNo

deleteKey(parameters)

Remove an existing key.

ParameterData TypeMandatory?
access-keystringYes
uidstringNo
subuserstringNo
key-typestringNo

getBucketInfo(parameters)

Get information about a subset of the existing buckets. If uid is specified without bucket then all buckets beloning to the user will be returned. If bucket alone is specified, information for that particular bucket will be retrieved.

ParameterData TypeMandatory?
uidstringNo
bucketstringNo
statsbooleanNo

deleteBucket(parameters)

Delete an existing bucket.

ParameterData TypeMandatory?
bucketstringYes
purge-objectsbooleanNo

getBucketIndex(parameters)

Check the index of an existing bucket. NOTE: to check multipart object accounting with check-objects, fix must be set to True.

ParameterData TypeMandatory?
bucketstringYes
check-objectsbooleanNo
fixbooleanNo

unlinkBucket(parameters)

Unlink a bucket from a specified user. Primarily useful for changing bucket ownership.

ParameterData TypeMandatory?
uidstringYes
bucketstringYes

linkBucket(parameters)

Link a bucket to a specified user, unlinking the bucket from any previous user.

ParameterData TypeMandatory?
uidstringYes
bucketstringYes

deleteObject(parameters)

Remove an existing object. NOTE: Does not require owner to be non-suspended.

ParameterData TypeMandatory?
bucketstringYes
objectstringYes

getBucketPolicy(parameters)

Read the policy of a bucket.

ParameterData TypeMandatory?
bucketstringYes
objectstringNo

getObjectPolicy(parameters)

Read the policy of an object.

ParameterData TypeMandatory?
bucketstringYes
objectstringYes

createUserCapability(parameters)

Add an administrative capability to a specified user.

ParameterData TypeMandatory?
uidstringYes
user-capsstringYes

deleteUserCapability(parameters)

Remove an administrative capability from a specified user.

ParameterData TypeMandatory?
uidstringYes
user-capsstringYes

getUserQuota(parameters)

Read the quota of an user.

ParameterData TypeMandatory?
uidstringYes

updateUserQuota(parameters)

Update the quota of an user.

ParameterData TypeMandatory?
uidstringYes
quotaObjectstringYes

getBucketQuota(parameters)

Read the quota of a bucket.

ParameterData TypeMandatory?
uidstringYes

updateBucketQuota(parameters)

Update the quota of a bucket.

ParameterData TypeMandatory?
uidstringYes
quotaObjectstringYes

FAQs

Package last updated on 16 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc