Interface HostAdministrationApi
-
@Beta @Consumes("application/json") @Path("/os-hosts") public interface HostAdministrationApi
Provides access to OpenStack Compute (Nova) Host Administration extension API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
disable(String hostId)
Prevent the specified host from accepting new instances.boolean
enable(String hostId)
Allow the specified host to accept new instances.com.google.common.collect.FluentIterable<Host>
list()
Returns the list of hostscom.google.common.collect.FluentIterable<HostResourceUsage>
listResourceUsage(String hostId)
Retrieves the physical/usage resource on a specific hostboolean
reboot(String hostId)
Reboot a host.boolean
shutdown(String hostId)
Shutdown a host.boolean
startMaintenance(String hostId)
Start host maintenance window.boolean
startup(String hostId)
Startup a host.boolean
stopMaintenance(String hostId)
Stop host maintenance window.
-
-
-
Method Detail
-
list
@Named("hostAdmin:list") @GET com.google.common.collect.FluentIterable<Host> list()
Returns the list of hosts- Returns:
- the usage information
-
listResourceUsage
@Named("hostAdmin:listResourceUsage") @GET @Path("/{id}") com.google.common.collect.FluentIterable<HostResourceUsage> listResourceUsage(@PathParam("id") String hostId)
Retrieves the physical/usage resource on a specific host- Returns:
- the usage information
-
enable
@Named("hostAdmin:enable") @PUT @Path("/{id}") @Produces("application/json") boolean enable(@PathParam("id") String hostId)
Allow the specified host to accept new instances.- Returns:
- true if successful
-
disable
@Named("hostAdmin:disable") @PUT @Path("/{id}") @Produces("application/json") boolean disable(@PathParam("id") String hostId)
Prevent the specified host from accepting new instances.- Returns:
- true if successful
-
startMaintenance
@Named("hostAdmin:startMaintenance") @PUT @Path("/{id}") @Produces("application/json") boolean startMaintenance(@PathParam("id") String hostId)
Start host maintenance window. Note: this triggers guest VMs evacuation.- Returns:
- true if successful
-
stopMaintenance
@Named("hostAdmin:stopMaintenance") @PUT @Path("/{id}") @Produces("application/json") boolean stopMaintenance(@PathParam("id") String hostId)
Stop host maintenance window.- Returns:
- true if successful
-
startup
@Named("hostAdmin:startup") @GET @Path("/{id}/startup") boolean startup(@PathParam("id") String hostId)
Startup a host.- Returns:
- true if successful
-
shutdown
@Named("hostAdmin:shutdown") @GET @Path("/{id}/shutdown") boolean shutdown(@PathParam("id") String hostId)
Shutdown a host.- Returns:
- true if successful
-
reboot
@Named("hostAdmin:reboot") @GET @Path("/{id}/reboot") boolean reboot(@PathParam("id") String hostId)
Reboot a host.- Returns:
- true if successful
-
-