Search in sources :

Example 11 with StoragePoolResponse

use of org.apache.cloudstack.api.response.StoragePoolResponse in project cloudstack by apache.

the class CancelPrimaryStorageMaintenanceCmd method execute.

@Override
public void execute() throws ResourceUnavailableException {
    StoragePool result = _storageService.cancelPrimaryStorageForMaintenance(this);
    if (result != null) {
        StoragePoolResponse response = _responseGenerator.createStoragePoolResponse(result);
        response.setResponseName(getCommandName());
        this.setResponseObject(response);
    } else {
        throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to cancel primary storage maintenance");
    }
}
Also used : StoragePoolResponse(org.apache.cloudstack.api.response.StoragePoolResponse) StoragePool(com.cloud.storage.StoragePool) ServerApiException(org.apache.cloudstack.api.ServerApiException)

Aggregations

StoragePoolResponse (org.apache.cloudstack.api.response.StoragePoolResponse)11 StoragePool (com.cloud.storage.StoragePool)5 ArrayList (java.util.ArrayList)5 ServerApiException (org.apache.cloudstack.api.ServerApiException)5 StoragePoolJoinVO (com.cloud.api.query.vo.StoragePoolJoinVO)3 StorageStats (com.cloud.storage.StorageStats)2 Hashtable (java.util.Hashtable)2 List (java.util.List)2 ListResponse (org.apache.cloudstack.api.response.ListResponse)2 ResourceInUseException (com.cloud.exception.ResourceInUseException)1 ResourceUnavailableException (com.cloud.exception.ResourceUnavailableException)1 Cluster (com.cloud.org.Cluster)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 UnknownHostException (java.net.UnknownHostException)1 DataStore (org.apache.cloudstack.engine.subsystem.api.storage.DataStore)1 DataStoreDriver (org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver)1 StoragePoolMetricsResponse (org.apache.cloudstack.response.StoragePoolMetricsResponse)1