From: Marco Fontani Date: Sat, 20 Nov 2010 19:24:29 +0000 (+0000) Subject: Removed compilation error, fixed _rs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FOyster.git;a=commitdiff_plain;h=e4c303246b11e0ccd6606d601a9c3e5836c95474 Removed compilation error, fixed _rs --- diff --git a/lib/Oyster/Provision/Rackspace.pm b/lib/Oyster/Provision/Rackspace.pm index fff8bcd..f1127d1 100644 --- a/lib/Oyster/Provision/Rackspace.pm +++ b/lib/Oyster/Provision/Rackspace.pm @@ -11,7 +11,7 @@ has 'api_username' => ( is => 'ro', isa => 'Str', required => 1, lazy_build => 1 sub _build_api_username { return $ENV{CLOUDSERVERS_USER} if exists $ENV{CLOUDSERVERS_USER}; confess "Need api_username or CLOUDSERVERS_USER in environment"; -}); +} has 'api_password' => ( is => 'ro', isa => 'Str', required => 1, lazy_build => 1); sub _build_api_password { @@ -28,16 +28,6 @@ has '_rs' => ( is => 'rw', isa => 'Net::RackSpace::CloudServers', default => sub $rs; }); -after BUILD => sub { - my $self = shift; - # get api username and key from config? - my $config = $self->config; - - - - # ... -}; - sub create { my $self = shift; @@ -57,7 +47,7 @@ sub create { # Build the server my $server = Net::RackSpace::CloudServers::Server->new( - cloudservers => $self->_cs, + cloudservers => $self->_rs, name => $self->name, flavor => $self->size, image => $self->image,