Skip to content

robertcarr/RightAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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(username, password, 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)

About

Ruby wrapper for RightScale API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages