blib/lib/VM/EC2/Spot/DatafeedSubscription.pm untested

filter: Statementstmt 0.0% 0 / 11 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
valid_fields
2.0
fault
2.0
BEGIN
2.0
CRAP 2.0
1 package VM::EC2::Spot::DatafeedSubscription;
2  
3 =head1 NAME
4  
5 VM::EC2::Spot::DatafeedSubscription - Object describing an Amazon EC2 spot instance datafeed subscription
6  
7 =head1 SYNOPSIS
8  
9 use VM::EC2;
10  
11 $ec2 = VM::EC2->new(...);
12 $sub = $ec2->create_spot_datafeed_subscription('myBucket','SPOT:');
13 my $owner = $sub->ownerId;
14 my $bucket = $sub->bucket;
15 my $prefix = $sub->prefix;
16 my $state = $sub->state;
17 my $error = $sub->fault;
18  
19 =head1 DESCRIPTION
20  
21 This object represents an Amazon EC2 spot instance datafeed subscription,
22 and is returned by VM::EC2->create_spot_datafeed_subscription() and
23 VM::EC2->describe_spot_datafeed_subscription().
24  
25 =head1 METHODS
26  
27 These object methods are supported:
28  
29 ownerId -- ID of the owner of this subscription
30 bucket -- bucket receiving the subscription files
31 prefix -- prefix for log files written into the bucket
32 state -- state of the subscription; one of 'Active' or 'Inactive'
33 fault -- VM::EC2::Error object describing errors in the
34 subscription.
35 =head1 SEE ALSO
36  
37 L<VM::EC2>
38 L<VM::EC2::Generic>
39  
40 =head1 AUTHOR
41  
42 Lincoln Stein E<lt>lincoln.stein@gmail.comE<gt>.
43  
44 Copyright (c) 2011 Ontario Institute for Cancer Research
45  
46 This package and its accompanying libraries is free software; you can
47 redistribute it and/or modify it under the terms of the GPL (either
48 version 1, or at your option, any later version) or the Artistic
49 License 2.0. Refer to LICENSE for the full license text. In addition,
50 please see DISCLAIMER.txt for disclaimers of warranty.
51  
52 =cut
53  
54 use strict;
55 use base 'VM::EC2::Generic';
56  
57 sub valid_fields {
58 my $self = shift;
59 return qw(ownerId bucket prefix state fault);
60 }
61  
62 sub fault {
63 my $self = shift;
64 my $f = $self->SUPER::fault or return;
65 return VM::EC2::Error->new($f,$self->ec2);
66 }
67 1;