Search in sources :

Example 1 with UpdateClusterCmd

use of org.apache.cloudstack.api.command.admin.cluster.UpdateClusterCmd in project cloudstack by apache.

the class RollingMaintenanceManagerImpl method updateCluster.

private void updateCluster(long clusterId, String allocationState) {
    Cluster cluster = resourceManager.getCluster(clusterId);
    if (cluster == null) {
        throw new InvalidParameterValueException("Unable to find the cluster by id=" + clusterId);
    }
    UpdateClusterCmd updateClusterCmd = new UpdateClusterCmd();
    updateClusterCmd.setId(clusterId);
    updateClusterCmd.setAllocationState(allocationState);
    resourceManager.updateCluster(updateClusterCmd);
}
Also used : InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) Cluster(com.cloud.org.Cluster) UpdateClusterCmd(org.apache.cloudstack.api.command.admin.cluster.UpdateClusterCmd)

Aggregations

InvalidParameterValueException (com.cloud.exception.InvalidParameterValueException)1 Cluster (com.cloud.org.Cluster)1 UpdateClusterCmd (org.apache.cloudstack.api.command.admin.cluster.UpdateClusterCmd)1