CumuLogic, Inc

CumulogicClient

This is a Ruby gem that supports working with the CumuLogic Cloud Services Platform API from within Ruby.

This software is Copyright (c) 2014 CumuLogic, Inc, and is licensed via the Apache Software Licence v2.

Status

At this time, the current API bindings are limited to the NoSQL Relational Database as a Service (DBaaS) service module of the CumuLogic platform.

Additional modules (Relational DBaaS, Queue-as-a-Service, ElasticCache, LBaaS) will be added to this library over time.

The current released gem version is:

Gem Version

Installation

Add this line to your application's Gemfile:

gem 'cumulogic_client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cumulogic_client

Usage

The example function below will return a Nosql client object:

require 'cumulogic_client'

def get_client()
  url = "http://sandbox.cumulogic.com/cumulogic/REST/"
  user = "[email protected]"
  password = "MyPass"
  ssl = false
  debugon = false
  CumulogicClient::Nosql.new(url, user, password, ssl, debugon)
end

Once you have a client, you can make any of the supported calls via the object's methods. In the example below, we will retrieve a listing of Nosql service catalog items from a target controller.

cl = get_client()
clplans = cl.get_serviceplans(userid(), 6)

One important item to note is the use of the integer 6 as the second param of that call.
That is the ID of the Nosql service type in the specific target cloud.

Testing

Tests can be run using "rake test". The test suite requires a working CumuLogic controller target, and a username and password with permission to deploy services.

In order to provide the test suite with the required credentials, place a YAML file at ~/.cumulogic_client.yml with the following contents:

URL: https://demo.cumulogic.com/cumulogic/REST/
USER: yourusername
PASSWORD: yourpassword
SSL: true
DEBUG: false
NOSQLSERVICEID: 6

Contributing

CumuLogic welcomes community involvement in improving this client binding. To contribute, simply:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request