org.jclouds.glesys.features
Interface ServerClient


public interface ServerClient

Provides synchronous access to Server.

Author:
Adrian Cole, Adam Lowe
See Also:
ServerAsyncClient,

Method Summary
 ServerDetails cloneServer(String serverid, String hostname, CloneServerOptions... options)
          Clone a server
 ServerDetails createServerWithHostnameAndRootPassword(ServerSpec serverSpec, String hostname, String rootPassword, CreateServerOptions... options)
          Create a new server
 ServerDetails destroyServer(String id, DestroyServerOptions keepIp)
          Destroy a server
 ServerDetails editServer(String serverid, EditServerOptions... options)
          Edit the configuration of a server
 Map<String,AllowedArgumentsForCreateServer> getAllowedArgumentsForCreateServerByPlatform()
          Get information about valid arguments to #createServer for each platform
 Console getConsole(String id)
          Get information about how to connect to a server via VNC
 ServerDetails getServerDetails(String id)
          Get detailed information about a server such as hostname, hardware configuration (cpu, memory and disk), ip addresses, cost, transfer, os and more.
 Map<String,ServerLimit> getServerLimits(String id)
          Get detailed information about a server's limits (for OpenVZ only).
 ServerStatus getServerStatus(String id, ServerStatusOptions... options)
          Get detailed information about a server status including up-time and hardware usage (cpu, disk, memory and bandwidth)
 void hardStopServer(String id)
          hard stop a server
 Set<Server> listServers()
          Get a list of all servers on this account.
 Set<OSTemplate> listTemplates()
          Get information about the OS templates available
 ServerDetails rebootServer(String id)
          Reboot a server
 void resetPassword(String id, String password)
          Reset the root password of a server
 Map<String,ServerLimit> resetServerLimit(String id, String type)
          Reset the fail count for a server limit (for OpenVZ only).
 void resourceUsage(String id, String resource, String resolution)
          Return resource usage over time for server
 ServerDetails startServer(String id)
          Start a server
 void stopServer(String id)
          Stop a server
 

Method Detail

listServers

Set<Server> listServers()
Get a list of all servers on this account.

Returns:
an account's associated server objects.

getServerDetails

ServerDetails getServerDetails(String id)
Get detailed information about a server such as hostname, hardware configuration (cpu, memory and disk), ip addresses, cost, transfer, os and more.

Parameters:
id - id of the server
Returns:
server or null if not found

getServerStatus

ServerStatus getServerStatus(String id,
                             ServerStatusOptions... options)
Get detailed information about a server status including up-time and hardware usage (cpu, disk, memory and bandwidth)

Parameters:
id - id of the server
options - optional parameters
Returns:
the status of the server or null if not found

getServerLimits

Map<String,ServerLimit> getServerLimits(String id)
Get detailed information about a server's limits (for OpenVZ only).

Parameters:
id - id of the server
Returns:
the requested information about the server or null if not found

getConsole

Console getConsole(String id)
Get information about how to connect to a server via VNC

Parameters:
id - id of the server
Returns:
the requested information about the server or null if not found

listTemplates

Set<OSTemplate> listTemplates()
Get information about the OS templates available

Returns:
the set of information about each template

getAllowedArgumentsForCreateServerByPlatform

Map<String,AllowedArgumentsForCreateServer> getAllowedArgumentsForCreateServerByPlatform()
Get information about valid arguments to #createServer for each platform

Returns:
a map of argument lists, keyed on platform

resetServerLimit

Map<String,ServerLimit> resetServerLimit(String id,
                                         String type)
Reset the fail count for a server limit (for OpenVZ only).

Parameters:
id - id of the server
type - the type of limit to reset

rebootServer

ServerDetails rebootServer(String id)
Reboot a server

Parameters:
id - id of the server

startServer

ServerDetails startServer(String id)
Start a server

Parameters:
id - id of the server

stopServer

void stopServer(String id)
Stop a server

Parameters:
id - id of the server

hardStopServer

void hardStopServer(String id)
hard stop a server

Parameters:
id - id of the server

createServerWithHostnameAndRootPassword

ServerDetails createServerWithHostnameAndRootPassword(ServerSpec serverSpec,
                                                      String hostname,
                                                      String rootPassword,
                                                      CreateServerOptions... options)
Create a new server

Parameters:
hostname - the host name of the new server
rootPassword - the root password to use
options - optional settings ex. description

editServer

ServerDetails editServer(String serverid,
                         EditServerOptions... options)
Edit the configuration of a server

Parameters:
serverid - the serverId of the server to edit
options - the settings to change

cloneServer

ServerDetails cloneServer(String serverid,
                          String hostname,
                          CloneServerOptions... options)
Clone a server

Parameters:
serverid - the serverId of the server to clone
hostname - the new host name of the cloned server
options - the settings to change

destroyServer

ServerDetails destroyServer(String id,
                            DestroyServerOptions keepIp)
Destroy a server

Parameters:
id - the id of the server
keepIp - if DestroyServerOptions.keepIp(true) the servers ip will be retained for use in your GleSYS account

resetPassword

void resetPassword(String id,
                   String password)
Reset the root password of a server

Parameters:
id - the id of the server
password - the new password to use

resourceUsage

@Beta
void resourceUsage(String id,
                        String resource,
                        String resolution)
Return resource usage over time for server

Parameters:
id - the id of the server
resource - the name of the resource to retrieve usage information for


Copyright © 2009-2012 jclouds. All Rights Reserved.