Class HostAggregateServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.compute.internal.BaseComputeServices
-
- org.openstack4j.openstack.compute.internal.HostAggregateServiceImpl
-
- All Implemented Interfaces:
HostAggregateService,RestService
public class HostAggregateServiceImpl extends BaseComputeServices implements HostAggregateService
Host Aggregate Operation API implementation- Author:
- liujunpeng
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
BaseOpenStackService.Invocation<R>
-
-
Constructor Summary
Constructors Constructor Description HostAggregateServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HostAggregateaddHost(String hostAggregateId, String host)Add host to aggregateHostAggregatecreate(String name, String availabilityZone)Create a hostAggregateActionResponsedelete(String aggregateId)Delete of the aggregateNovaHostAggregateget(String aggregateId)Get the specified HostAggregate by IDList<? extends HostAggregate>list()List all aggregates (detailed) that the current tenant has access toList<? extends HostAggregate>list(Map<String,String> filteringParams)Returns list of Aggregates filtered by parameters.HostAggregateremoveHost(String hostAggregateId, String host)remove host from aggregateHostAggregatesetMetadata(String hostAggregateId, Map<String,String> metadata)Sets metadata for an aggregate.HostAggregateupdate(String hostAggregateId, String name, String availabilityZone)Updates the name, and optionally the availability zone, for a specified aggregate.-
Methods inherited from class org.openstack4j.openstack.compute.internal.BaseComputeServices
invokeAction, invokeActionWithResponse
-
Methods inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
delete, deleteWithResponse, get, getProvider, getServiceVersion, getWithResponse, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, putWithResponse, request, toList, uri
-
-
-
-
Method Detail
-
list
public List<? extends HostAggregate> list()
List all aggregates (detailed) that the current tenant has access to- Specified by:
listin interfaceHostAggregateService- Returns:
- list of all aggregates
-
list
public List<? extends HostAggregate> list(Map<String,String> filteringParams)
Returns list of Aggregates filtered by parameters.- Specified by:
listin interfaceHostAggregateService- Parameters:
filteringParams- map (name, value) of filtering parameters
-
get
public NovaHostAggregate get(String aggregateId)
Get the specified HostAggregate by ID- Specified by:
getin interfaceHostAggregateService- Returns:
- the Aggregate or null if not found
-
delete
public ActionResponse delete(String aggregateId)
Delete of the aggregate- Specified by:
deletein interfaceHostAggregateService- Parameters:
aggregateId- the aggregate identifier- Returns:
- the action response
-
create
public HostAggregate create(String name, String availabilityZone)
Create a hostAggregate- Specified by:
createin interfaceHostAggregateService- Returns:
- HostAggregate
-
update
public HostAggregate update(String hostAggregateId, String name, @Nullable String availabilityZone)
Updates the name, and optionally the availability zone, for a specified aggregate.- Specified by:
updatein interfaceHostAggregateService- Parameters:
hostAggregateId- the aggregate identifier- Returns:
- HostAggregate
-
setMetadata
public HostAggregate setMetadata(String hostAggregateId, Map<String,String> metadata)
Sets metadata for an aggregate.- Specified by:
setMetadatain interfaceHostAggregateService- Parameters:
hostAggregateId- the aggregate identifier- Returns:
- HostAggregate
-
addHost
public HostAggregate addHost(String hostAggregateId, String host)
Add host to aggregate- Specified by:
addHostin interfaceHostAggregateService- Parameters:
hostAggregateId- The ID associated with an aggregate.host- Host ID to add to an aggregate, which is a collection of multiple groups of hosts that share common resources like storage and network.- Returns:
- HostAggregate
-
removeHost
public HostAggregate removeHost(String hostAggregateId, String host)
remove host from aggregate- Specified by:
removeHostin interfaceHostAggregateService- Parameters:
hostAggregateId- The ID associated with an aggregate.host- Host ID to add to an aggregate, which is a collection of multiple groups of hosts that share common resources like storage and network.- Returns:
- HostAggregate
-
-