| 1 | package CloudDeploy::CommandLine::InspectDeployment { | ||
| 2 | use MooseX::App; | ||
| 3 | use CloudDeploy::DeploymentCollection; | ||
| 4 | use Data::Printer; | ||
| 5 | |||
| 6 | parameter deploy_name => ( | ||
| 7 | is => 'rw', | ||
| 8 | isa => 'Str', | ||
| 9 | documentation => 'The name of the deployment in the database', | ||
| 10 | required => 1, | ||
| 11 | ); | ||
| 12 | |||
| 13 | sub run { | ||
| 14 | my ($self) = @_; | ||
| 15 | |||
| 16 | my $deployments = CloudDeploy::DeploymentCollection->new(account => $ENV{'CPSD_AWS_ACCOUNT'}); | ||
| 17 | my $deploy = $deployments->get_deployment($self->deploy_name); | ||
| 18 | |||
| 19 | print "\nTYPE:\n"; | ||
| 20 | p $deploy->type; | ||
| 21 | print "\nPARAMS:\n"; | ||
| 22 | p $deploy->params; | ||
| 23 | print "\nOUTPUTS:\n"; | ||
| 24 | p $deploy->outputs; | ||
| 25 | print "\nCOMMENTS:\n"; | ||
| 26 | if (defined $deploy->comments) { p $deploy->comments; print "\n"; } | ||
| 27 | else { print "No comments available.\n\n"; } | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | 1; |