| 1 | package VM::EC2::Volume::Status::Details; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | VM::EC2::Volume::Status::Details - Object describing the details of an volume status check | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | @status_items = $ec2->describe_volume_status(); | ||
| 10 | for my $i (@status_items) { | ||
| 11 | print $i->volume_id,': ',$i->status,"\n"; | ||
| 12 | if ($i->volume ne 'ok') { | ||
| 13 | my @details = $i->volume_status->details; | ||
| 14 | for my $d (@details) { | ||
| 15 | print $d->name,"\n"; | ||
| 16 | print $d->status,"\n"; | ||
| 17 | } | ||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | =head1 DESCRIPTION | ||
| 22 | |||
| 23 | This object represents additional details about a failed system or | ||
| 24 | volume status check. | ||
| 25 | |||
| 26 | =head1 METHODS | ||
| 27 | |||
| 28 | These methods are supported: | ||
| 29 | |||
| 30 | name() -- The type of volume status detail, such as "reachability". | ||
| 31 | status() -- The status of the check, "passed", "failed" or "insufficient-data". | ||
| 32 | impaired_since() -- The time when a status check failed as a DateTime string. | ||
| 33 | |||
| 34 | In a string context, this object interpolates as the name(). | ||
| 35 | |||
| 36 | =head1 SEE ALSO | ||
| 37 | |||
| 38 | L<VM::EC2> | ||
| 39 | L<VM::EC2::Generic> | ||
| 40 | L<VM::EC2::Volume> | ||
| 41 | L<VM::EC2::Volume::State> | ||
| 42 | L<VM::EC2::Volume::StatusItem> | ||
| 43 | L<VM::EC2::Volume::Status> | ||
| 44 | L<VM::EC2::Volume::Status::Event> | ||
| 45 | L<VM::EC2::Tag> | ||
| 46 | |||
| 47 | =head1 AUTHOR | ||
| 48 | |||
| 49 | Lincoln Stein E<lt>lincoln.stein@gmail.comE<gt>. | ||
| 50 | |||
| 51 | Copyright (c) 2012 Ontario Institute for Cancer Research | ||
| 52 | |||
| 53 | This package and its accompanying libraries is free software; you can | ||
| 54 | redistribute it and/or modify it under the terms of the GPL (either | ||
| 55 | version 1, or at your option, any later version) or the Artistic | ||
| 56 | License 2.0. Refer to LICENSE for the full license text. In addition, | ||
| 57 | please see DISCLAIMER.txt for disclaimers of warranty. | ||
| 58 | |||
| 59 | =cut | ||
| 60 | |||
| 61 | use strict; | ||
| 62 | use base 'VM::EC2::Generic'; | ||
| 63 | |||
| 64 | use strict; | ||
| 65 | |||
| 66 | sub valid_fields { | ||
| 67 | my $self = shift; | ||
| 68 | return qw(name status); | ||
| 69 | } | ||
| 70 | |||
| 71 | sub short_name { | ||
| 72 | my $self = shift; | ||
| 73 | my $status = $self->status; | ||
| 74 | my $name = $self->name; | ||
| 75 | return "$name $status"; | ||
| 76 | } | ||
| 77 | |||
| 78 | 1; | ||
| 79 |