Cloud laziness part 1: creating a CloudServers server instance

The following is ongoing on my private branch of the CPAN dist Net::RackSpace::CloudServers, in which I'm creating an App::Cmd interface to the module:

okram@bluedesk: (with_app_cmd)
~/GIT/Net-RackSpace-CloudServers$ perl create \
  --name=mfapitest --imagename karmic --flavorname 256 --verbose
Server name: mfapitest
Image id 14362 named Ubuntu 9.10 (karmic)
Flavor id 1 named 256 server
Creating new server...
Created server ID 124999
root password: mfapitestXXXXXXX
Public IP:
Private IP:
Server status: ACTIVE progress: 100..
Server now available!

The same is indeed doable with the sample scripts/ in the dist -- and I also need to use scripts/ to destroy the test instance -- but I assume that a command-line interface may be useful in the longer term to scale up/down specific instances, create N new servers in a shared IP group, or destroy no longer needed instances.

The command was pretty painless to write, and most of it was the validate_args routine...

As usual, comments would be much appreciated!
Till soon,

Leave a comment

About Marco Fontani

user-pic Slicing and splicing onions