Ruby wrapper for RightScale API
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 5 commits ahead, 1 commit behind robertcarr:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
LICENSE
README

README

RightAPI.rb
===========
A generic API wrapper to interface with the RightScale Cloud Computing API.
You need to handle formatting the API string properly with object ID's & the proper resource but it should do the rest.

Requires rest_client Ruby gem available online. 'gem install rest-client'
 
More details on the API calls can be found at:
http://support.rightscale.com/15-References/RightScale_API_Reference_Guide

 api = RightAPI.new	
 api.log = true
 api.login(:user => username, :password => password, :account => account)
 
Allows you to send API messages to RightScale in a standard format (see API reference)
http://support.rightscale.com/15-References/RightScale_API_Reference_Guide

 api.send(API_STRING,REST_TYPE, PARAMS)

# e.g.	API_STRING = "ec2_ssh_keys/1234"
#	REST_TYPE = GET | PUT | POST | DELETE 		
#	PARAMS = optional depending on call


# Displays list of servers in XML format.
puts api.send("servers")               

# Create new deployment with the following parameters
params = { 'deployment[nickname]' => 'my_deployment_name', 'deployment[description]' => 'my_description' }
api.send("deployments","post",params)