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 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 server
        imageName - the name of the image to create
        backupType - the type of backup
        rotation - 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