X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FOyster%2FProvision%2FRackspace.pm;fp=lib%2FOyster%2FProvision%2FRackspace.pm;h=1f31cfc53acd62ea8af5cf4d158d595d42dcb777;hb=8a0402ec798af800cd25fe0d26fd1e5ef1d0fef0;hp=31e5973a5e42089411e7fb94e8bb8d0452403c92;hpb=962bb120e96bf79325c0429ca716b281621bdfe1;p=p5sagit%2FOyster.git diff --git a/lib/Oyster/Provision/Rackspace.pm b/lib/Oyster/Provision/Rackspace.pm index 31e5973..1f31cfc 100644 --- a/lib/Oyster/Provision/Rackspace.pm +++ b/lib/Oyster/Provision/Rackspace.pm @@ -11,24 +11,28 @@ has 'api_username' => ( is => 'ro', isa => 'Str', required => 1, default => sub return $ENV{CLOUDSERVERS_USER} if exists $ENV{CLOUDSERVERS_USER}; confess "Need api_username or CLOUDSERVERS_USER in environment"; }); -has 'api_key' => ( is => 'ro', isa => 'Str', required => 1, default => sub { + +has 'api_password' => ( is => 'ro', isa => 'Str', required => 1, default => sub { return $ENV{CLOUDSERVERS_KEY} if exists $ENV{CLOUDSERVERS_KEY}; - confess "Need api_key or RACKSPACE_KEY in environment"; + confess "Need api_password or CLOUDSERVERS_KEY in environment"; }); has '_rs' => ( is => 'rw', isa => 'Net::RackSpace::CloudServers', default => sub { my $self = shift; my $rs = Net::RackSpace::CloudServers->new( user => $self->api_username, - key => $self->api_key, + key => $self->api_password, ); $rs; }); -sub BUILD { +after BUILD => sub { my $self = shift; # get api username and key from config? my $config = $self->config; + + + # ... } @@ -111,7 +115,9 @@ The following are required to instantiate a backend: The rackspace API username, or C<$ENV{RACKSPACE_USER}> will be used if that is not given -=item api_key +=item password + +This is your rackspace API Key The rackspace API key, or C<$ENV{RACKSPACE_KEY}> will be used if that is not given