
Net::RackSpace::CloudServers::Flavor - a RackSpace CloudServers Flavor

version 0.14

use Net::RackSpace::CloudServers;
use Net::RackSpace::CloudServers::Flavor;
my $cs = Net::RackSpace::CloudServers->new( user => 'myusername', key => 'mysecretkey' );
my $flavor = Net::RackSpace::CloudServers::Flavor->new(
cloudservers => $cs,
id => '1', name => 'test', ram => 5, disk => 10,
);
# get list:
my @flavors = $cs->flavors;
foreach my $flavor ( @flavors ) {
print 'Have flavor ', $flavor->name, ' id ', $flavor->id, "\n";
}
# get detailed list
my @flavors = $cs->flavors(1);
foreach my $flavor ( @flavors ) {
print 'Have flavor ', $flavor->name, ' id ', $flavor->id,
' ram ', $flavor->ram, ' disk ', $flavor->disk,
"\n";
}

The constructor creates a Flavor:
my $flavor = Net::RackSpace::CloudServers::Flavor->new(
cloudserver => $cs
id => 'id', name => 'name',
);
This normally gets created for you by Net::RackSpace::Cloudserver's flavors or flavorsdetails methods. Needs a Net::RackSpace::CloudServers::Flavor object.
The id is used for the creation of new cloudservers
The name which identifies the flavor
How much RAM does this flavor have
How much disk space does this flavor have

Marco Fontani, <mfontani at cpan.org>

Please report any bugs or feature requests to bug-net-rackspace-cloudservers at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-RackSpace-CloudServers. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc Net::RackSpace::CloudServers::Flavor
You can also look for information at:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-RackSpace-CloudServers

Copyright 2009 Marco Fontani, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.