Interface HostAggregateApi
-
@Beta @Consumes("application/json") @Path("/os-aggregates") public interface HostAggregateApi
Provide access to the OpenStack Compute (Nova) Host Aggregates extension API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HostAggregate
addHost(String id, String host)
Adds a host to an aggregateHostAggregate
createInAvailabilityZone(String name, String availabilityZone)
Creates an aggregate, given its name and availability zone.Boolean
delete(String id)
Removes an aggregate.HostAggregate
get(String id)
Retrieves the details of an aggregate, hosts and metadata included.com.google.common.collect.FluentIterable<HostAggregate>
list()
Lists all host aggregates.HostAggregate
removeHost(String id, String host)
Removes a host from an aggregateHostAggregate
setMetadata(String id, Map<String,String> metadata)
Adds metadata to an aggregateHostAggregate
updateAvailabilityZone(String id, String availabilityZone)
Updates the availability zone for an aggregate.HostAggregate
updateName(String id, String name)
Updates the name of an aggregate.
-
-
-
Method Detail
-
list
@Named("hostAggregate:list") @GET com.google.common.collect.FluentIterable<HostAggregate> list()
Lists all host aggregates.- Returns:
- the set of host aggregates.
-
get
@Named("hostAggregate:get") @GET @Path("/{id}") @Nullable HostAggregate get(@PathParam("id") String id)
Retrieves the details of an aggregate, hosts and metadata included.- Returns:
- the details of the aggregate requested.
-
createInAvailabilityZone
@Named("hostAggregate:create") @POST @Produces("application/json") HostAggregate createInAvailabilityZone(String name, String availabilityZone)
Creates an aggregate, given its name and availability zone.- Returns:
- the newly created Aggregate
-
updateName
@Named("hostAggregate:update") @POST @Path("/{id}") HostAggregate updateName(@PathParam("id") String id, String name)
Updates the name of an aggregate.
-
updateAvailabilityZone
@Named("hostAggregate:update") @POST @Path("/{id}") HostAggregate updateAvailabilityZone(@PathParam("id") String id, String availabilityZone)
Updates the availability zone for an aggregate.
-
delete
@Named("hostAggregate:delete") @DELETE @Path("/{id}") Boolean delete(@PathParam("id") String id)
Removes an aggregate.
-
addHost
@Named("hostAggregate:addHost") @POST @Path("/{id}/action") @Produces("application/json") HostAggregate addHost(@PathParam("id") String id, String host)
Adds a host to an aggregate
-
removeHost
@Named("hostAggregate:removeHost") @POST @Path("/{id}/action") @Produces("application/json") HostAggregate removeHost(@PathParam("id") String id, String host)
Removes a host from an aggregate
-
setMetadata
@Named("hostAggregate:setMetadata") @POST @Path("/{id}/action") @Produces("application/json") HostAggregate setMetadata(@PathParam("id") String id, Map<String,String> metadata)
Adds metadata to an aggregate
-
-