Ruby client library for Simplestack.
Clone or download
Latest commit 2639c94 Feb 5, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Parsing errors raises SimpleStack::Exception now Jun 23, 2015
spec Updating rspec version Feb 5, 2016
.gitignore
Gemfile Initial Commit Jun 12, 2012
README.markdown
Rakefile
contributing.md Improves readme and adds a contributing file. Feb 4, 2016
simple_stack.gemspec

README.markdown

Simplestack ruby client

A simple gem made to provide a nice syntax when working with Simplestack project.

How to use it

First of all add the gem to your Gemfile:

gem "simple_stack", "~> 1.0"

Now that you have the Simplestack namespace available, get a simplestack class:

stack = SimpleStack::Connection.new :url => url, :username => username, :password => password

and connect to hypervisor:

xen = stack.connect_to("xen", :host => host, :username => username, :password => password)

Pool informations:

xen.info
xen.guests

Working with Guests

Main operations:

guest = xen.guests.find(uuid)
guest.info
guest.update(:name => "Guest name", :memory => 512)
guest.delete

Shutdown and power on and reboot

guest.stop
guest.start
guest.reboot

Force the guest shutdown

guest.force_stop

Resume and suspend guests

guest.resume
guest.pause

Snapshots

List snapshots

guest.snapshots

Find a snapshot

guest.snapshots.find(snap.uuid)

Create a new snapshot

snap = guest.snapshots.create :name => :snapshot_name

Delete a snapshot

snap.delete

Revert a snapshot

snap.use

Authors