Project

redstack

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby binding for the OpenStack API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

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