The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

VERSION

version 0.15

SYNOPSIS

  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";
  }

METHODS

new / BUILD

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.

id

The id is used for the creation of new cloudservers

name

The name which identifies the flavor

ram

How much RAM does this flavor have

disk

How much disk space does this flavor have

AUTHOR

Marco Fontani, <mfontani at cpan.org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Net::RackSpace::CloudServers::Flavor

You can also look for information at:

COPYRIGHT & LICENSE

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.