NAME

Net::RackSpace::CloudServers::Server - a RackSpace CloudServers Server instance

VERSION

version 0.05_00

SYNOPSIS

use Net::RackSpace::CloudServers;
use Net::RackSpace::CloudServers::Server;
my $cs = Net::RackSpace::CloudServers->new( user => 'myusername', key => 'mysecretkey' );
my $server = Net::RackSpace::CloudServers::Server->new(
  cloudservers => $cs,
  id => '1', name => 'test',
);
# get list: 
my @servers = $cs->get_server;
foreach my $server ( @servers ) {
  print 'Have server ', $server->name, ' id ', $server->id, "\n";
}
# get detailed list
my @servers = $cs->get_server_detail();
foreach my $server ( @servers) {
  print 'Have server ', $server->name, ' id ', $server->id,
    # ...
    "\n";
}

METHODS

new / BUILD

The constructor creates a Server:

my $server = Net::RackSpace::CloudServers::Server->new(
  cloudserver => $cs
  id => 'id', name => 'name',
);

This normally gets created for you by Net::RackSpace::Cloudserver's get_server or get_server_detail methods. Needs a Net::RackSpace::CloudServers object as cloudserver parameter.

change_name

Changes the server's name to the new value given. Dies on error, or returns the response

$srv->change_name('newname');

change_root_password

Changes the server's root password to the new value given. Dies on error, or returns the response

$srv->change_root_password('toor');

ATTRIBUTES

id

The id is used for the creation of new cloudservers

name

The name which identifies the server

imageid

The ID of the Net::RackSpace::CloudServer::Image from which the server has been created

flavorid

The ID of the Net::RackSpace::CloudServer::Flavor the server is currently running as

hostid

An ID which univocally identifies a server on your account. May not be unique across accounts.

status

The status of the server: building, etc

progress

The progress of the current status operation: 60%, etc.

public_address

Arrayref containing the list of public addresses the server is configured to use

private_address

Arrayref containing the list of private addresses the server is configured to use

metadata

Hashref containing any metadata that has been set for the server

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

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.