org.jclouds.openstack.nova.v2_0.features
Interface ServerApi


public interface ServerApi

Provides synchronous access to Server.

Author:
Adrian Cole
See Also:
ServerAsyncApi,

Method Summary
 void changeAdminPass(String id, String adminPass)
          Change the administrative password to a server.
 void confirmResizeServer(String id)
          Confirm a resize operation.
 String createImageFromServer(String name, String id)
          Create an image from a server.
 ServerCreated createServer(String name, String imageRef, String flavorRef, CreateServerOptions... options)
          Create a new server
 Boolean deleteServer(String id)
          Terminate and delete a server.
 Server getServer(String id)
          List details of the specified server
 Set<Resource> listServers()
          List all servers (IDs, names, links)
 Set<Server> listServersInDetail()
          List all servers (all details)
 void rebootServer(String id, RebootType rebootType)
          Reboot a server.
 void rebuildServer(String id, RebuildServerOptions... options)
          Rebuild a server.
 void renameServer(String id, String newName)
          Rename a server.
 void resizeServer(String id, String flavorId)
          Resize a server to a new flavor size.
 void revertResizeServer(String id)
          Revert a resize operation.
 void startServer(String id)
          Start a server
 void stopServer(String id)
          Stop a server
 

Method Detail

listServers

Set<Resource> listServers()
List all servers (IDs, names, links)

Returns:
all servers (IDs, names, links)

listServersInDetail

Set<Server> listServersInDetail()
List all servers (all details)

Returns:
all servers (all details)

getServer

Server getServer(String id)
List details of the specified server

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

createServer

ServerCreated createServer(String name,
                           String imageRef,
                           String flavorRef,
                           CreateServerOptions... options)
Create a new server

Parameters:
name - name of the server to create
imageRef - reference to the image for the server to use
flavorRef - reference to the flavor to use when creating the server
options - optional parameters to be passed into the server creation request
Returns:
the newly created server

deleteServer

Boolean deleteServer(String id)
Terminate and delete a server.

Parameters:
id - id of the server
Returns:
True if successful, False otherwise

startServer

void 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

rebootServer

void rebootServer(String id,
                  RebootType rebootType)
Reboot a server.

Parameters:
id - id of the server
rebootType - The type of reboot to perform (Hard/Soft)

resizeServer

void resizeServer(String id,
                  String flavorId)
Resize a server to a new flavor size.

Parameters:
id - id of the server
flavorId - id of the new flavor to use

confirmResizeServer

void confirmResizeServer(String id)
Confirm a resize operation.

Parameters:
id - id of the server

revertResizeServer

void revertResizeServer(String id)
Revert a resize operation.

Parameters:
id - id of the server

rebuildServer

void rebuildServer(String id,
                   RebuildServerOptions... options)
Rebuild a server.

Parameters:
id - id of the server
options - Optional paramaters to the rebuilding operation.

changeAdminPass

void changeAdminPass(String id,
                     String adminPass)
Change the administrative password to a server.

Parameters:
id - id of the server
adminPass - The new administrative password to use

renameServer

void renameServer(String id,
                  String newName)
Rename a server.

Parameters:
id - id of the server
newName - The new name for the server

createImageFromServer

String createImageFromServer(String name,
                             String id)
Create an image from a server.

Parameters:
name - The name of the new image
id - id of the server
Returns:
ID of the new / updated image


Copyright © 2009-2012 jclouds. All Rights Reserved.