Subject: | describe_availability_zones not working |
Date: | Wed, 28 Nov 2012 17:18:42 +0100 |
To: | bug-Net-Amazon-EC2 [...] rt.cpan.org |
From: | Etienne Michon <etienne.michon [...] gmail.com> |
Hi,
Here is my environment:
- Linux ic 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux
- perl v5.14.2 built for x86_64-linux-gnu-thread-multi
- Net::Amazon::EC2 v0.21. I cannot use the last 0.22 version because it
does not work.
I tried to run a small code to describe the availability zone in my
Eucalyptus. I get the following output when trying to run the
describe_availability_zones
method:
-------------------------------------
Eucalyptus
Walrus
Attribute (region_name) does not pass the type constraint because:
Validation failed for 'Str' with value undef at constructor
Net::Amazon::EC2::AvailabilityZone::new (defined at
/usr/local/share/perl/5.14.2/Net/Amazon/EC2/AvailabilityZone.pm line 41)
line 41
Net::Amazon::EC2::AvailabilityZone::new('Net::Amazon::EC2::AvailabilityZone',
'zone_name', 'cluster-ic', 'zone_state', 130.79.192.211, 'region_name',
undef, 'messages', undef) called at
/usr/local/share/perl/5.14.2/Net/Amazon/EC2.pm line 1389
Net::Amazon::EC2::describe_availability_zones(undef) called at
tmp.pl line 14
-------------------------------------
The code is the following:
-------------------------------------
my $ec2 = Net::Amazon::EC2->new(
AWSAccessKeyId => 'XXXX',
SecretAccessKey => 'XXXX',
region_name => 'Eucalyptus',
base_url => 'http://127.0.0.1:8773/services/Eucalyptus',
);
my $regions_ref = $ec2->describe_regions;
for my $region(@$regions_ref) {
print $region->region_name."\n";
}
print $ec2->describe_availability_zones();
-------------------------------------
As you can see, the call to describe_regions is working while the one to
describe_availability_zones is not.
Am I doing something wrong or is it a bug?
Thanks
Best regads
--
Etienne Michon