| 1 | package VM::EC2::ReservedInstance::ParmParser; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use base 'VM::EC2::ParmParser'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | sub ri_target_config_parm { | ||||||||||||||||||||||||||||
| 6 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
ri_target_config_parm: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 7 | 0 | my ($argname,$val) = @_; | |||||||||||||||||||||||||||
| 8 | 0 | my @param; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 0 | ▶ | my @config = ref $val eq 'ARRAY' ? @$val : ( $val ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 11 | 0 | ▶ | for (my $i=0; $i<@config; $i++) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 12 | 0 | my $config = $config[$i]; | |||||||||||||||||||||||||||
| 13 | 0 | my $n = $i+1; | |||||||||||||||||||||||||||
| 14 | 0 | foreach my $p (qw(AvailabilityZone Platform | |||||||||||||||||||||||||||
| 15 | InstanceCount InstanceType)) { | ||||||||||||||||||||||||||||
| 16 | push @param, ("ReservedInstancesConfigurationSetItemType.$n.$p" => | ||||||||||||||||||||||||||||
| 17 | 0 | ▶ | $config->{$p}) if $config->{$p}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | 0 | return @param; | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | sub ri_price_sched_parm { | ||||||||||||||||||||||||||||
| 24 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
ri_price_sched_parm: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 25 | 0 | my ($argname,$val) = @_; | |||||||||||||||||||||||||||
| 26 | 0 | ▶ | return unless $val && ref $val eq 'HASH'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$val and ref $val eq "HASH"
MC/DC0%0/2
$val and ref $val eq "HASH"
$val
ref $val eq "HASH"
Truth table0%0/3
A and B
A= $valB= ref $val eq "HASH"
| |||||||||||||||||||||||||||||
| 27 | 0 | my @param; | |||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 0 | my $i = 0; | |||||||||||||||||||||||||||
| 30 | 0 | foreach my $month (keys %$val) { | |||||||||||||||||||||||||||
| 31 | 0 | push @param, "$argname.$i.Price" => $val->{$month}; | |||||||||||||||||||||||||||
| 32 | 0 | push @param, "$argname.$i.Term" => $month; | |||||||||||||||||||||||||||
| 33 | 0 | $i++; | |||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | 0 | return @param; | |||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 1 | 1; | |||||||||||||||||||||||||||