From: iain Date: Sat, 20 Nov 2010 16:00:59 +0000 (+0000) Subject: added basic provision files X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ded63474d7f715bb3c6be48ad6c39cb63f726df;p=p5sagit%2FOyster.git added basic provision files --- diff --git a/lib/Oyster/Provision.pm b/lib/Oyster/Provision.pm index 1a00c9c..4da50bc 100644 --- a/lib/Oyster/Provision.pm +++ b/lib/Oyster/Provision.pm @@ -1,3 +1,18 @@ -package Oyster::Provision +package Oyster::Provision; + +use Moose; + +sub config { + return {provision_backend => 'Oyster::Provision::Rackspace'}; +} + +sub BUILD { + + my $self = shift; + + my $role = $self->config()->{provision_backend}; + + "$role"->meta->apply($self); +} 1; diff --git a/lib/Oyster/Provision/Rackspace.pm b/lib/Oyster/Provision/Rackspace.pm index 82578a5..34cb8bd 100644 --- a/lib/Oyster/Provision/Rackspace.pm +++ b/lib/Oyster/Provision/Rackspace.pm @@ -1,3 +1,25 @@ package Oyster::Provision::Rackspace; +use Moose::Role; + +requires 'config'; + +sub create { + my $self = shift; + + $self->config(); +} + + +sub delete { + my $self = shift; + + $self->config(); +} + +sub resize { + my $self = shift; + + $self->config(); +} 1;