Giter VIP home page Giter VIP logo

mms-api's Introduction

mms-api

Minimalistic MMS API agent for ruby

Installation

gem install mms-api

Cli

$ mms-api --help
mms-api is a tool for accessing MMS API

Usage:

	mms-api command [options]

Commands:

	groups | hosts | clusters | snapshots | restorejobs | restorejobs-create

Options:

    -u, --username <string>           MMS user
    -k, --apikey <string>             MMS api-key
    -n, --name <string>               Filter by resource name using regexp
    -l, --limit <int>                 Limit for result items
    -v, --version                     Version
    -h, --help                        Show this help

API coverage

The MMS Public API follows the principles of the REST architectural style to expose a number of internal resources which enable programmatic access to MMS’s features. Current implementation support only a few of API features.

Resource Get All Get One Create Update Delete
Groups + +
Hosts + +
Clusters + +
Snapshots + +
Restore Jobs + + +

Example

require 'mms'

agent = MMS::Agent.new('username', 'apikey')

# all available resources
group_list = agent.groups
host_list = agent.hosts
cluster_list = agent.clusters
snapshot_list = agent.snapshots
job_list = agent.restorejobs

# get first cluster from list
cluster = cluster_list.first

# get list of all restore-jobs for specific cluster
job_list = agent.findGroup(cluster.group.id).cluster(cluster.id).restorejobs
# or simply using cluster instance
job_list = cluster.restorejobs

# get first snapshot from list
snapshot = snapshot_list.first

# create restore job for snapshot
group_id = snapshot.cluster.group.id
cluster_id = snapshot.cluster.id
snapshot_id = snapshot.id
job_list = agent.findGroup(group_id).cluster(cluster_id).snapshot(snapshot_id).create_restorejob
# or simply using snapshot instance
job_list = snapshot.create_restorejob

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.