Interface ServerAdminApi
-
@Beta @Consumes("application/json") @Path("/servers/{id}/action") public interface ServerAdminApi
Provide access to the OpenStack Compute (Nova) Admin Server Actions Extension API. Provide additional actions for servers: 'suspend', 'resume', 'migrate', 'lock', 'unlock', 'resetNetwork', 'createBackup', 'pause', 'migrateLive', 'injectNetworkInfo', 'unpause'
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
createBackup(String id, String imageName, BackupType backupType, int rotation, CreateBackupOfServerOptions... options)
Create backup of a server.void
injectNetworkInfo(String id)
Inject network info into a server.void
liveMigrate(String id, String host, boolean blockMigration, boolean diskOverCommit)
Live migrate a server.void
lock(String id)
Lock a server.void
migrate(String id)
Migrate a server.void
pause(String id)
Pause a server.void
resetNetwork(String id)
Reset network of a server.void
resume(String id)
Resume a server.void
suspend(String id)
Suspend a server.void
unlock(String id)
Unlock a server.void
unpause(String id)
Unpause a server.
-
-
-
Method Detail
-
suspend
@Named("serverAdmin:suspend") @POST @Produces("application/json") void suspend(@PathParam("id") String id)
Suspend a server.- Parameters:
id
- id of the server
-
resume
@Named("serverAdmin:resume") @POST @Produces("application/json") void resume(@PathParam("id") String id)
Resume a server.- Parameters:
id
- id of the server
-
migrate
@Named("serverAdmin:migrate") @POST @Produces("application/json") void migrate(@PathParam("id") String id)
Migrate a server.- Parameters:
id
- id of the server
-
lock
@Named("serverAdmin:lock") @POST @Produces("application/json") void lock(@PathParam("id") String id)
Lock a server.- Parameters:
id
- id of the server
-
unlock
@Named("serverAdmin:unlock") @POST @Produces("application/json") void unlock(@PathParam("id") String id)
Unlock a server.- Parameters:
id
- id of the server
-
resetNetwork
@Named("serverAdmin:resetNetwork") @POST @Produces("application/json") void resetNetwork(@PathParam("id") String id)
Reset network of a server.- Parameters:
id
- id of the server
-
createBackup
@Named("serverAdmin:createBackup") @POST @Produces("application/json") String createBackup(@PathParam("id") String id, String imageName, BackupType backupType, int rotation, CreateBackupOfServerOptions... options)
Create backup of a server.- Parameters:
id
- id of the serverimageName
- the name of the image to createbackupType
- the type of backuprotation
- the number of images to retain (0 to simply overwrite)options
- optional rotation and/or metadata parameters- Returns:
- the id of the newly created image
-
pause
@Named("serverAdmin:pause") @POST @Produces("application/json") void pause(@PathParam("id") String id)
Pause a server.- Parameters:
id
- id of the server
-
unpause
@Named("serverAdmin:unpause") @POST @Produces("application/json") void unpause(@PathParam("id") String id)
Unpause a server.- Parameters:
id
- id of the server
-
liveMigrate
@Named("serverAdmin:liveMigrate") @POST @Produces("application/json") void liveMigrate(@PathParam("id") String id, String host, boolean blockMigration, boolean diskOverCommit)
Live migrate a server.- Parameters:
id
- id of the server
-
injectNetworkInfo
@Named("serverAdmin:injectNetwork") @POST @Produces("application/json") void injectNetworkInfo(@PathParam("id") String id)
Inject network info into a server.- Parameters:
id
- id of the server
-
-