I wanted to get an idea of how to add commands within the Rackspace provider that re-use existing middleware, like ConnectRackspace to get the Fog::Compute connection. I haven't added tests or beautified the output, but I wanted to share a simple working solution to get feedback.
This adds the commands:
(Remember that in this repo you'll need to use "bundle exec", but normal vagrant-rackspace users won't)
Also, multi-machine settings do work. In a multiple machine environment (like the Vagrantfile.multi sample I added) the command without sub arguments will display the images (or flavors) available for each machine. In the Vagrantfile.multi example the machines are named after regions, so you can view images or flavors for just the machine named dfw with:
rackspace command and subcommands
proper multi-machine support
If you're going to go this far, feel like fixing #71 by adding a "freezedry" action that creates an image?
Multi region sample Vagrantfile
Format image and flavor tables w/ 36 char columns
Ensure at least rspec 2.14 to switch to expectations syntax
Pull out spec_helper from existing test
Tests for the actions
More accurate coverage report (eager loading)
@maxlinc Can I get you to submit another PR adding the documentation for this?
@maxlinc LGTM!!! Thanks!!!
Merge pull request #73 from maxlinc/commands
rackspace command and subcommands (list images and flavors)
Working on it, but FYI it seems like in order to get help (i.e. vagrant rackspace images -h) working properly need to refactor, so the PR won't be just docs.
vagrant rackspace images -h