use of com.cloud.dc.StorageNetworkIpRange in project cosmic by MissionCriticalCloud.
the class UpdateStorageNetworkIpRangeCmd method execute.
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
try {
final StorageNetworkIpRange result = _storageNetworkService.updateIpRange(this);
final StorageNetworkIpRangeResponse response = _responseGenerator.createStorageNetworkIpRangeResponse(result);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} catch (final Exception e) {
s_logger.warn("Update storage network IP range failed", e);
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
}
}
use of com.cloud.dc.StorageNetworkIpRange in project CloudStack-archive by CloudStack-extras.
the class listStorageNetworkIpRangeCmd method execute.
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
try {
List<StorageNetworkIpRange> results = _storageNetworkService.listIpRange(this);
ListResponse<StorageNetworkIpRangeResponse> response = new ListResponse<StorageNetworkIpRangeResponse>();
List<StorageNetworkIpRangeResponse> resList = new ArrayList<StorageNetworkIpRangeResponse>(results.size());
for (StorageNetworkIpRange r : results) {
StorageNetworkIpRangeResponse resp = _responseGenerator.createStorageNetworkIpRangeResponse(r);
resList.add(resp);
}
response.setResponses(resList);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} catch (Exception e) {
s_logger.warn("Failed to list storage network ip range for rangeId=" + getRangeId() + " podId=" + getPodId() + " zoneId=" + getZoneId());
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, e.getMessage());
}
}
use of com.cloud.dc.StorageNetworkIpRange in project cloudstack by apache.
the class UpdateStorageNetworkIpRangeCmd method execute.
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
try {
StorageNetworkIpRange result = _storageNetworkService.updateIpRange(this);
StorageNetworkIpRangeResponse response = _responseGenerator.createStorageNetworkIpRangeResponse(result);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} catch (Exception e) {
s_logger.warn("Update storage network IP range failed", e);
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
}
}
use of com.cloud.dc.StorageNetworkIpRange in project cosmic by MissionCriticalCloud.
the class ListStorageNetworkIpRangeCmd method execute.
// ///////////////////////////////////////////////////
// ///////////////// Accessors ///////////////////////
// ///////////////////////////////////////////////////
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
try {
final List<StorageNetworkIpRange> results = _storageNetworkService.listIpRange(this);
final ListResponse<StorageNetworkIpRangeResponse> response = new ListResponse<>();
final List<StorageNetworkIpRangeResponse> resList = new ArrayList<>(results.size());
for (final StorageNetworkIpRange r : results) {
final StorageNetworkIpRangeResponse resp = _responseGenerator.createStorageNetworkIpRangeResponse(r);
resList.add(resp);
}
response.setResponses(resList);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} catch (final Exception e) {
s_logger.warn("Failed to list storage network ip range for rangeId=" + getRangeId() + " podId=" + getPodId() + " zoneId=" + getZoneId());
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
}
}
Aggregations