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:
- ekasit.kijsipongse@nectec.or.th
-
-
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 ClusteraddNodeGroup(String clusterId, NodeGroup nodeGroup)Add a new node group in the specified clusterClustercreate(Cluster cluster)Create a new clusterActionResponsedelete(String clusterId)Delete the specified clusterClusterget(String clusterId)Get a cluster by IDList<? extends Cluster>list()List all clustersClusterresizeNodeGroup(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:
listin interfaceClusterService- Returns:
- list of images or empty
-
get
public Cluster get(String clusterId)
Get a cluster by ID- Specified by:
getin 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:
createin interfaceClusterService- Parameters:
cluster- the cluster to create- Returns:
- the created cluster
-
delete
public ActionResponse delete(String clusterId)
Delete the specified cluster- Specified by:
deletein 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:
resizeNodeGroupin 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:
addNodeGroupin interfaceClusterService- Parameters:
clusterId- the cluster identifiernodeGroup- the new node group- Returns:
- the updated cluster
-
-