Old Prototype. Use aviator/aviator instead.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.coveralls.yml
.gitignore
.ruby-gemset
.ruby-version
.travis.yml
Gemfile
Guardfile
LICENSE.txt
README.md
Rakefile
TODO.md
redstack.gemspec

README.md

RedStack

A Ruby binding for the OpenStack API.

Code Climate Build Status Coverage Status

Installation

Add this line to your application's Gemfile:

gem 'redstack'

And then execute:

$ bundle

Or install it yourself as:

$ gem install redstack

Usage

require 'redstack'

# Define a Keystone connection
ks = RedStack::Identity.new host: 'http://myopenstackinstance.com:5000', api_version: 'v2.0'

# Authenticate against Keystone
token = ks.authenticate username: 'johndoe', password: 'gu29qa!'

# Get a list of tenants/projects you have access to
projects = ks.find_projects

#Create a project (Requires token with admin access)
ks.authenticate username: 'johndoe', password: 'adfw@1', tenant: 'my_project'
project = ks.create_project name: 'New Project', description: 'My awesome project', enabled: true

# Get all projects in the system  (Requires token with admin access)
ks.authenticate username: 'johndoe', password: 'adfw@1', tenant: 'my_project'
projects = ks.find_projects select: :all

# Re-use token in other services
ks.authenticate username: 'johndoe', password: 'adfw@1', tenant: 'my_project'
nc = RedStack::Compute.new token: ks.token
servers = nc.find_servers

# ...or Re-use it in a new Keystone instance
ks2 = RedStack::Identity.new token: ks.token

Contributing

  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

Setting Up Your Local Dev Environment

A few requirements before proceeding:

  • RVM
  • git
  • growl on Mac OS X

Once the above have been installed, go to the RedStack project directory and install the required gems:

bundle install

Now you can start developing! Open the project folder with your favorit text editor, then, on your terminal, run guard from the project directory:

bundle exec guard