org.jclouds.glesys.features
Interface ServerApi


public interface ServerApi

Provides synchronous access to Server.

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

Method Summary
 ServerDetails clone(String serverid, String hostname, CloneServerOptions... options)
          Clone a server
 ServerDetails createWithHostnameAndRootPassword(ServerSpec serverSpec, String hostname, String rootPassword, CreateServerOptions... options)
          Create a new server
 ServerDetails destroy(String id, DestroyServerOptions keepIp)
          Destroy a server
 ServerDetails get(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,AllowedArgumentsForCreateServer> getAllowedArgumentsForCreateByPlatform()
          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
 Map<String,ServerLimit> getLimits(String id)
          Get detailed information about a server's limits (for OpenVZ only).
 ResourceUsage getResourceUsage(String id, String resource, String resolution)
          Return resource usage over time for server
 ServerStatus getStatus(String id, ServerStatusOptions... options)
          Get detailed information about a server status including up-time and hardware usage (cpu, disk, memory and bandwidth)
 ServerDetails hardStop(String id)
          hard stop a server
 com.google.common.collect.FluentIterable<Server> list()
          Get a list of all servers on this account.
 com.google.common.collect.FluentIterable<OSTemplate> listTemplates()
          Get information about the OS templates available
 ServerDetails reboot(String id)
          Reboot a server
 Map<String,ServerLimit> resetLimit(String id, String type)
          Reset the fail count for a server limit (for OpenVZ only).
 ServerDetails resetPassword(String id, String password)
          Reset the root password of a server
 ServerDetails start(String id)
          Start a server
 ServerDetails stop(String id)
          Stop a server
 ServerDetails update(String serverid, UpdateServerOptions options)
          Update the configuration of a server
 

Method Detail

list

com.google.common.collect.FluentIterable<Server> list()
Get a list of all servers on this account.

Returns:
an account's associated server objects.

get

ServerDetails get(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

getStatus

ServerStatus getStatus(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

getLimits

Map<String,ServerLimit> getLimits(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

com.google.common.collect.FluentIterable<OSTemplate> listTemplates()
Get information about the OS templates available

Returns:
the set of information about each template

getAllowedArgumentsForCreateByPlatform

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

Returns:
a map of argument lists, keyed on platform

resetLimit

Map<String,ServerLimit> resetLimit(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

reboot

ServerDetails reboot(String id)
Reboot a server

Parameters:
id - id of the server

start

ServerDetails start(String id)
Start a server

Parameters:
id - id of the server

stop

ServerDetails stop(String id)
Stop a server

Parameters:
id - id of the server

hardStop

ServerDetails hardStop(String id)
hard stop a server

Parameters:
id - id of the server

createWithHostnameAndRootPassword

ServerDetails createWithHostnameAndRootPassword(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

update

ServerDetails update(String serverid,
                     UpdateServerOptions options)
Update the configuration of a server

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

clone

ServerDetails clone(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

destroy

ServerDetails destroy(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

ServerDetails 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

getResourceUsage

@Beta
ResourceUsage getResourceUsage(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 (e.g. "cpuusage")
resolution - the time-period to extract data for (one of "minute", "hour" or "day)


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.