Giter VIP home page Giter VIP logo

redstack's Introduction

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

redstack's People

Contributors

relaxdiego avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

kwilder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.