blib/lib/VM/EC2/ELB/Attributes.pm untested

filter: Statementstmt 0.0% 0 / 37 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 54 CC 1 SCAR 6.9
CC
1
Cov
0%
valid_fields
2.0
AccessLog
2.0
ConnectionDraining
2.0
CRAP 2.0
1 package VM::EC2::ELB::Attributes;
2  
3 =head1 NAME
4  
5 VM::EC2::ELB:Attributes - Object describing the attributes of an Elastic
6 Load Balancer.
7  
8 =head1 SYNOPSIS
9  
10 use VM::EC2;
11  
12 my $ec2 = VM::EC2->new(...);
13 my $lb = $ec2->describe_load_balancer_attributes('my-lb');
14 my $access_log = $lb->AccessLog;
15 my $conn_drain = $lb->ConnectionDraining;
16 my $conn_settings = $lb->ConnectionSettings;
17 my $cross_zone = $lb->CrossZoneLoadBalancing;
18  
19 =head1 DESCRIPTION
20  
21 This object is used to describe the parameters returned by a
22 DescribeLoadBalancerAttributes API call.
23  
24 =head1 METHODS
25  
26 The following object methods are supported:
27
28 AccessLog -- If enabled, the load balancer captures detailed
29 information of all the requests and delivers the
30 information to the Amazon S3 bucket that you
31 specify.
32  
33 ConnectionDraining -- If enabled, the load balancer allows existing
34 requests to complete before the load balancer
35 shifts traffic away from a deregistered or
36 unhealthy back-end instance.
37  
38 ConnectionSettings -- By default, the Elastic Load Balancer maintains a
39 60-second idle connection timeout for both front-
40 end and back-end connections of your load
41 balancer. If the ConnectionSettings attribute is
42 set, Elastic Load Balancing will allow the
43 connections to remain idle (no data is sent over
44 the connection) for the specified duration.
45  
46 CrossZoneLoadBalancing -- If enabled, the load balancer routes the request
47 traffic evenly across all back-end instances
48 regardless of the Availability Zones.
49  
50 =head1 STRING OVERLOADING
51  
52 When used in a string context, this object will interpolate the
53 instance state.
54  
55 =head1 SEE ALSO
56  
57 L<VM::EC2>
58 L<VM::EC2::Generic>
59 L<VM::EC2::ELB>
60  
61 =head1 AUTHOR
62  
63 Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>.
64  
65 Copyright (c) 2014 Loyalty Methods, Inc.
66  
67 This package and its accompanying libraries is free software; you can
68 redistribute it and/or modify it under the terms of the GPL (either
69 version 1, or at your option, any later version) or the Artistic
70 License 2.0. Refer to LICENSE for the full license text. In addition,
71 please see DISCLAIMER.txt for disclaimers of warranty.
72  
73 =cut
74  
75 use strict;
76 use base 'VM::EC2::Generic';
77 use VM::EC2::ELB::Attributes::AccessLog;
78 use VM::EC2::ELB::Attributes::ConnectionDraining;
79 use VM::EC2::ELB::Attributes::ConnectionSettings;
80 use VM::EC2::ELB::Attributes::CrossZoneLoadBalancing;
81  
82 use overload
83 '""' => sub {
84 my $self = shift;
85 my $string = $self->AccessLog . "\n";
86 $string .= $self->ConnectionDraining. "\n";
87 $string .= $self->ConnectionSettings. "\n";
88 $string .= $self->CrossZoneLoadBalancing;
89 return $string},
90 fallback => 1;
91  
92 sub valid_fields {
93 my $self = shift;
94 return qw(AccessLog ConnectionDraining
95 ConnectionSettings CrossZoneLoadBalancing);
96 }
97  
98 sub AccessLog {
99 my $self = shift;
100 return VM::EC2::ELB::Attributes::AccessLog->new($self->SUPER::AccessLog,$self->aws);
101 }
102  
103 sub ConnectionDraining {
104 my $self = shift;
105 return VM::EC2::ELB::Attributes::ConnectionDraining->new($self->SUPER::ConnectionDraining,$self->aws);
106 }
107  
108 sub ConnectionSettings {
109 my $self = shift;
110 return VM::EC2::ELB::Attributes::ConnectionSettings->new($self->SUPER::ConnectionSettings,$self->aws);
111 }
112  
113 sub CrossZoneLoadBalancing {
114 my $self = shift;
115 return VM::EC2::ELB::Attributes::CrossZoneLoadBalancing->new($self->SUPER::CrossZoneLoadBalancing,$self->aws);
116 }
117  
118 1;