Marco Fontani > Net-RackSpace-CloudServers > Net::RackSpace::CloudServers::Limits

Download:
Net-RackSpace-CloudServers-0.14.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.14   Source  

NAME ^

Net::RackSpace::CloudServers::Limits - a RackSpace CloudServers Limits instance

VERSION ^

version 0.14

SYNOPSIS ^

  use Net::RackSpace::CloudServers;
  use Net::RackSpace::CloudServers::Limits;
  my $cs = Net::RackSpace::CloudServers->new(
    user => $ENV{CLOUDSERVERS_USER},
    key => $ENV{CLOUDSERVERS_KEY},
  );
  my $limits = Net::RackSpace::CloudServers::Limits->new(
    cloudservers => $cs,
  );
  $limits->refresh();
  print "Can still allocate ", $limits->totalramsize, " MB RAM\n";
  print "Can still use      ", $limits->maxipgroups, " IP Groups\n";
  print "Can have           ", $limits->maxipgroupmembers, " more IP groups members\n";
  # next bit isn't OO-ed yet.
  foreach my $k ( @{ $limits->rate } ) {
    print $k->{verb}, ' to URI ', $k->{URI}, ' remaining: ',
      $k->{remaining}, ' per ', $k->{unit},
      ' (will be reset at: ', scalar localtime $k->{resetTime}, ')',
      "\n";
  }

METHODS ^

new / BUILD

The constructor creates a Limits half-object. See refresh to refresh the limits once gathered.

This normally gets created for you by Net::RackSpace::Cloudserver's limits method. Needs a Net::RackSpace::CloudServers object as cloudserver parameter.

refresh

This method refreshes the information contained in the object

ATTRIBUTES ^

totalramsize

Indicates the maximum amount of RAM (in megabytes) linked to your account.

maxipgroups

Indicates the maximum number of shared IP groups your account can create

maxipgroupmembers

Indicates the maximum amount of servers that can be associated with any one shared IP group

rate

TODO: not yet OO-ified.

Is an arrayref of the rate-limits that currently apply to your account via the API. You'll receive 413 errors in case you exceed the limits described.

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::Limits

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.

syntax highlighting: