Class ClusterServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.sahara.internal.BaseSaharaServices
-
- org.openstack4j.openstack.sahara.internal.ClusterServiceImpl
-
- All Implemented Interfaces:
ClusterService
,RestService
public class ClusterServiceImpl extends BaseSaharaServices implements ClusterService
Sahara Data Processing Operations- Author:
- [email protected]
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
BaseOpenStackService.Invocation<R>
-
-
Constructor Summary
Constructors Constructor Description ClusterServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cluster
addNodeGroup(String clusterId, NodeGroup nodeGroup)
Add a new node group in the specified clusterCluster
create(Cluster cluster)
Create a new clusterActionResponse
delete(String clusterId)
Delete the specified clusterCluster
get(String clusterId)
Get a cluster by IDList<? extends Cluster>
list()
List all clustersCluster
resizeNodeGroup(String clusterId, String groupName, int count)
Resize a node group in the specified cluster-
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 Cluster> list()
List all clusters- Specified by:
list
in interfaceClusterService
- Returns:
- list of images or empty
-
get
public Cluster get(String clusterId)
Get a cluster by ID- Specified by:
get
in interfaceClusterService
- Parameters:
clusterId
- the cluster identifier- Returns:
- the cluster or null if not found
-
create
public Cluster create(Cluster cluster)
Create a new cluster- Specified by:
create
in interfaceClusterService
- Parameters:
cluster
- the cluster to create- Returns:
- the created cluster
-
delete
public ActionResponse delete(String clusterId)
Delete the specified cluster- Specified by:
delete
in interfaceClusterService
- Parameters:
clusterId
- the cluster identifier- Returns:
- the action response
-
resizeNodeGroup
public Cluster resizeNodeGroup(String clusterId, String groupName, int count)
Resize a node group in the specified cluster- Specified by:
resizeNodeGroup
in interfaceClusterService
- Parameters:
clusterId
- the cluster identifiergroupName
- the name of the node groupcount
- the number of instances in the node group- Returns:
- the updated cluster
-
addNodeGroup
public Cluster addNodeGroup(String clusterId, NodeGroup nodeGroup)
Add a new node group in the specified cluster- Specified by:
addNodeGroup
in interfaceClusterService
- Parameters:
clusterId
- the cluster identifiernodeGroup
- the new node group- Returns:
- the updated cluster
-
-