Permalink
Browse files

All renamed to Net::RackSpace::CloudServers

  • Loading branch information...
1 parent f8281e2 commit ae03e4c507c8d7e5f322ffec326843d387b20206 @mfontani committed Jul 17, 2009
View
@@ -1,4 +1,7 @@
-Revision history for Net-Mosso-CloudServers
+Revision history for Net-RackSpace-CloudServers
+
+0.03 2009-07-17 1530 BST
+ Refactored servers; will be changed to Net-RackSpace-CloudServers
0.02 2009-07-16 1942 BST
Able to list servers and limits
View
@@ -1,5 +1,5 @@
-name = Net-Mosso-CloudServers
-version = 0.02
+name = Net-RackSpace-CloudServers
+version = 0.03
author = Marco Fontani
license = Perl_5
copyright_holder = Marco Fontani
@@ -1,12 +1,12 @@
-package Net::Mosso::CloudServers;
+package Net::RackSpace::CloudServers;
use warnings;
use strict;
use Moose;
use MooseX::StrictConstructor;
-use Net::Mosso::CloudServers::Flavor;
-use Net::Mosso::CloudServers::Server;
-use Data::Stream::Bulk::Callback;
-use DateTime::Format::HTTP;
+use Net::RackSpace::CloudServers::Flavor;
+use Net::RackSpace::CloudServers::Server;
+#use Data::Stream::Bulk::Callback;
+#use DateTime::Format::HTTP;
use LWP::ConnCache::MaxKeepAliveRequests;
use LWP::UserAgent::Determined;
use URI::QueryParam;
@@ -168,7 +168,7 @@ sub get_server {
if ( defined $id && ref $hash_response->{server} ne 'HASH' );
return map {
- Net::Mosso::CloudServers::Server->new(
+ Net::RackSpace::CloudServers::Server->new(
cloudservers => $self,
id => $_->{id},
name => $_->{name},
@@ -185,7 +185,7 @@ sub get_server {
} @{ $hash_response->{servers} } if ( !defined $id );
my $hserver = $hash_response->{server};
- return Net::Mosso::CloudServers::Server->new(
+ return Net::RackSpace::CloudServers::Server->new(
cloudservers => $self,
id => $hserver->{id},
name => $hserver->{name},
@@ -224,7 +224,7 @@ sub limits {
confess 'response does not contain hashref of "limits"'
if ( ref $hash_response->{limits} ne 'HASH' );
- # return Net::Mosso::CloudServers::Limits->new(
+ # return Net::RackSpace::CloudServers::Limits->new(
# cloudservers => $self,
# limits => $hash_response->{limits}
# );
@@ -260,15 +260,15 @@ sub get_flavor {
if ( defined $id && ref $hash_response->{flavor} ne 'HASH' );
return map {
- Net::Mosso::CloudServers::Flavor->new(
+ Net::RackSpace::CloudServers::Flavor->new(
cloudservers => $self,
id => $_->{id},
name => $_->{name},
ram => $_->{ram},
disk => $_->{disk},
)
} @{ $hash_response->{flavors} } if ( !defined $id );
- return Net::Mosso::CloudServers::Flavor->new(
+ return Net::RackSpace::CloudServers::Flavor->new(
cloudservers => $self,
id => $hash_response->{flavor}->{id},
name => $hash_response->{flavor}->{name},
@@ -285,12 +285,12 @@ sub get_flavor_detail {
=head1 NAME
-Net::Mosso::CloudServers - Interface to Mosso/RackSpace CloudServers via API
+Net::RackSpace::CloudServers - Interface to RackSpace CloudServers via API
=head1 SYNOPSIS
- use Net::Mosso::CloudServers;
- my $cs = Net::Mosso::CloudServers->new(
+ use Net::RackSpace::CloudServers;
+ my $cs = Net::RackSpace::CloudServers->new(
user => 'myusername', key => 'mysecretkey'
);
# list my servers;
@@ -305,38 +305,38 @@ Net::Mosso::CloudServers - Interface to Mosso/RackSpace CloudServers via API
The constructor logs you into CloudServers:
- my $cs = Net::Mosso::CloudServers->new(
+ my $cs = Net::RackSpace::CloudServers->new(
user => 'myusername', key => 'mysecretkey'
);
=head2 get_server
Lists all the servers linked to the account. If no ID is passed as parameter, returns an array of
-L<Net::Mosso::CloudServers::Server> object containing only B<id> and B<name> set.
-If an ID is passed as parameter, it will return a L<Net::Mosso::CloudServers::Server> object
-containing B<id>, B<name>, B<imageid>, etc. See L<Net::Mosso::CloudServers::Server> for details.
+L<Net::RackSpace::CloudServers::Server> object containing only B<id> and B<name> set.
+If an ID is passed as parameter, it will return a L<Net::RackSpace::CloudServers::Server> object
+containing B<id>, B<name>, B<imageid>, etc. See L<Net::RackSpace::CloudServers::Server> for details.
my @servers = $cs->get_server; # all servers, id/name
my $test_server = $cs->get_server(1); # ID 1, detailed
=head2 get_server_detail
-Lists more details about all the servers and returns them as a L<Net::Mosso::CloudServers::Server> object:
+Lists more details about all the servers and returns them as a L<Net::RackSpace::CloudServers::Server> object:
my @servers = $cs->get_server_detail; # all servers, id/name
my $test_server = $cs->get_server_detail(1); # ID 1, detailed
=head2 limits
-Lists all the limits currently set for the account, and returns them as a L<Net::Mosso::CloudServers::Limits> object:
+Lists all the limits currently set for the account, and returns them as a L<Net::RackSpace::CloudServers::Limits> object:
my $limits = $cs->limits;
=head2 get_flavor
Lists all the flavors able to be used. If no ID is passed as parameter, returns an array of
-L<Net::Mosso::CloudServers::Flavor> object containing only B<id> and B<name> set.
-If an ID is passed as parameter, it will return a L<Net::Mosso::CloudServers::Flavor> object
+L<Net::RackSpace::CloudServers::Flavor> object containing only B<id> and B<name> set.
+If an ID is passed as parameter, it will return a L<Net::RackSpace::CloudServers::Flavor> object
containing B<id>, B<name>, B<ram> and B<disk>.
my @flavors = $cs->get_flavor;
@@ -348,8 +348,8 @@ containing B<id>, B<name>, B<ram> and B<disk>.
=head2 get_flavor_detail
Lists details of all the flavors able to be used. If no ID is passed as parameter, returns an
-array of L<Net::Mosso::CloudServers::Flavor>. All details are returned back: B<id>, B<name>,
-B<ram> and B<disk>. If an ID is passed as parameter, it will return a L<Net::Mosso::CloudServers::Flavor>
+array of L<Net::RackSpace::CloudServers::Flavor>. All details are returned back: B<id>, B<name>,
+B<ram> and B<disk>. If an ID is passed as parameter, it will return a L<Net::RackSpace::CloudServers::Flavor>
object with all details filled in.
=head1 AUTHOR
@@ -358,41 +358,41 @@ Marco Fontani, C<< <mfontani at cpan.org> >>
=head1 BUGS
-Please report any bugs or feature requests to C<bug-net-mosso-cloudservers at rt.cpan.org>, or through
-the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Mosso-CloudServers>. I will be notified, and then you'll
+Please report any bugs or feature requests to C<bug-net-rackspace-cloudservers at rt.cpan.org>, or through
+the web interface at L<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.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
- perldoc Net::Mosso::CloudServers
+ perldoc Net::RackSpace::CloudServers
You can also look for information at:
=over 4
=item * RT: CPAN's request tracker
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Mosso-CloudServers>
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-RackSpace-CloudServers>
=item * AnnoCPAN: Annotated CPAN documentation
-L<http://annocpan.org/dist/Net-Mosso-CloudServers>
+L<http://annocpan.org/dist/Net-RackSpace-CloudServers>
=item * CPAN Ratings
-L<http://cpanratings.perl.org/d/Net-Mosso-CloudServers>
+L<http://cpanratings.perl.org/d/Net-RackSpace-CloudServers>
=item * Search CPAN
-L<http://search.cpan.org/dist/Net-Mosso-CloudServers/>
+L<http://search.cpan.org/dist/Net-RackSpace-CloudServers/>
=back
=head1 ACKNOWLEDGEMENTS
-Leon Brocard for L<Net::Mosso::CloudFiles>
+Léon Brocard for L<Net::Mosso::CloudFiles>
=head1 COPYRIGHT & LICENSE
@@ -403,4 +403,4 @@ under the same terms as Perl itself.
=cut
-1; # End of Net::Mosso::CloudServers
+1; # End of Net::RackSpace::CloudServers
@@ -1,10 +1,10 @@
-package Net::Mosso::CloudServers::Flavor;
+package Net::RackSpace::CloudServers::Flavor;
use warnings;
use strict;
use Moose;
use MooseX::StrictConstructor;
-has 'cloudservers' => ( is => 'rw', isa => 'Net::Mosso::CloudServers', required => 1 );
+has 'cloudservers' => ( is => 'rw', isa => 'Net::RackSpace::CloudServers', required => 1 );
has 'id' => ( is => 'ro', isa => 'Int', required => 1 );
has 'name' => ( is => 'ro', isa => 'Str', required => 1 );
has 'ram' => ( is => 'ro', isa => 'Maybe[Int]', required => 1 );
@@ -15,14 +15,14 @@ __PACKAGE__->meta->make_immutable();
=head1 NAME
-Net::Mosso::CloudServers::Flavor - a Mosso/RackSpace CloudServers Flavor
+Net::RackSpace::CloudServers::Flavor - a RackSpace CloudServers Flavor
=head1 SYNOPSIS
- use Net::Mosso::CloudServers;
- use Net::Mosso::CloudServers::Flavor;
- my $cs = Net::Mosso::CloudServers->new( user => 'myusername', key => 'mysecretkey' );
- my $flavor = Net::Mosso::CloudServers::Flavor->new(
+ 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,
);
@@ -45,13 +45,13 @@ Net::Mosso::CloudServers::Flavor - a Mosso/RackSpace CloudServers Flavor
The constructor creates a Flavor:
- my $flavor = Net::Mosso::CloudServers::Flavor->new(
+ my $flavor = Net::RackSpace::CloudServers::Flavor->new(
cloudserver => $cs
id => 'id', name => 'name',
);
-This normally gets created for you by L<Net::Mosso::Cloudserver>'s L<flavors> or L<flavorsdetails> methods.
-Needs a Net::Mosso::CloudServers::Flavor object.
+This normally gets created for you by L<Net::RackSpace::Cloudserver>'s L<flavors> or L<flavorsdetails> methods.
+Needs a Net::RackSpace::CloudServers::Flavor object.
=head2 id
@@ -75,42 +75,38 @@ Marco Fontani, C<< <mfontani at cpan.org> >>
=head1 BUGS
-Please report any bugs or feature requests to C<bug-net-mosso-cloudservers at rt.cpan.org>, or through
-the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Mosso-CloudServers>. I will be notified, and then you'll
+Please report any bugs or feature requests to C<bug-net-rackspace-cloudservers at rt.cpan.org>, or through
+the web interface at L<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.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
- perldoc Net::Mosso::CloudServers::Flavor
+ perldoc Net::RackSpace::CloudServers::Flavor
You can also look for information at:
=over 4
=item * RT: CPAN's request tracker
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Mosso-CloudServers>
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-RackSpace-CloudServers>
=item * AnnoCPAN: Annotated CPAN documentation
-L<http://annocpan.org/dist/Net-Mosso-CloudServers>
+L<http://annocpan.org/dist/Net-RackSpace-CloudServers>
=item * CPAN Ratings
-L<http://cpanratings.perl.org/d/Net-Mosso-CloudServers>
+L<http://cpanratings.perl.org/d/Net-RackSpace-CloudServers>
=item * Search CPAN
-L<http://search.cpan.org/dist/Net-Mosso-CloudServers/>
+L<http://search.cpan.org/dist/Net-RackSpace-CloudServers/>
=back
-=head1 ACKNOWLEDGEMENTS
-
-Leon Brocard for L<Net::Mosso::CloudFiles>
-
=head1 COPYRIGHT & LICENSE
Copyright 2009 Marco Fontani, all rights reserved.
@@ -120,4 +116,4 @@ under the same terms as Perl itself.
=cut
-1; # End of Net::Mosso::CloudServers::Flavor
+1; # End of Net::RackSpace::CloudServers::Flavor
Oops, something went wrong.

0 comments on commit ae03e4c

Please sign in to comment.