Skip to content

Instantly share code, notes, and snippets.

@n1zyy
Created October 20, 2011 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n1zyy/1301361 to your computer and use it in GitHub Desktop.
Save n1zyy/1301361 to your computer and use it in GitHub Desktop.
Quick smoketest of aeolus-image-rubygem with iwhd
# Run this in IRB, of course
# Bring in aeolus-image-rubygem
require 'lib/aeolus_image'
# Load a config file; sample at https://gist.github.com/1301347
# In Conductor, we will do this setup automatically
# You want to pay attention to the :iwhd: section, of course. Note that :weird: YAML syntax.
# My iwhd is running like so:
# iwhd -c /etc/iwhd/conf.js -d localhost:27017 -l /var/log/iwhd.log -o -U user:password
config = YAML.load_file("/home/mawagner/aeolus/conductor/src/config/settings.yml")
Aeolus::Image::Warehouse::WarehouseModel.config = config
# use_oauth? should be true now
Aeolus::Image::Warehouse::WarehouseModel.use_oauth?
# Some sample commands now using OAuth
# (These are existing commands, nothing I added)
Aeolus::Image::Warehouse::Image.all
Aeolus::Image::Warehouse::ProviderImage.last
Aeolus::Image::Warehouse::Template.first
# Obviously, this uuid is unlikely to exist in your database:
Aeolus::Image::Warehouse::ImageBuild.find('925e5229-a207-4140-a224-756657b9d29b')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment