Class ClusterServiceImpl

    • Constructor Detail

      • ClusterServiceImpl

        public ClusterServiceImpl()
    • Method Detail

      • list

        public List<? extends Cluster> list()
        List all clusters
        Specified by:
        list in interface ClusterService
        Returns:
        list of images or empty
      • get

        public Cluster get​(String clusterId)
        Get a cluster by ID
        Specified by:
        get in interface ClusterService
        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 interface ClusterService
        Parameters:
        cluster - the cluster to create
        Returns:
        the created cluster
      • delete

        public ActionResponse delete​(String clusterId)
        Delete the specified cluster
        Specified by:
        delete in interface ClusterService
        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 interface ClusterService
        Parameters:
        clusterId - the cluster identifier
        groupName - the name of the node group
        count - 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 interface ClusterService
        Parameters:
        clusterId - the cluster identifier
        nodeGroup - the new node group
        Returns:
        the updated cluster