use of org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters in project ovirt-engine by oVirt.
the class BackendGlusterVolumeResource method getProfileStatistics.
@Override
public Response getProfileStatistics(Action action) {
boolean nfsStats = isNfsStatistics();
QueryReturnValue result = runQuery(QueryType.GetGlusterVolumeProfileInfo, new GlusterVolumeProfileParameters(Guid.createGuidFromString(parent.getParent().get().getId()), guid, nfsStats));
if (result != null && result.getSucceeded() && result.getReturnValue() != null) {
GlusterVolumeProfileInfo info = result.getReturnValue();
GlusterVolumeProfileDetails statistics = GlusterVolumeProfileInfoMapper.map(info, null);
statistics = LinkHelper.addLinks(statistics);
return Response.ok(statistics).build();
} else {
// throw exception
throw new WebFaultException(null, localize(Messages.BACKEND_FAILED), Response.Status.INTERNAL_SERVER_ERROR);
}
}
use of org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getGlusterVolumeProfilingStatistics.
public void getGlusterVolumeProfilingStatistics(AsyncQuery<QueryReturnValue> aQuery, Guid clusterId, Guid volumeId, boolean nfs) {
aQuery.setHandleFailure(true);
GlusterVolumeProfileParameters parameters = new GlusterVolumeProfileParameters(clusterId, volumeId, nfs);
Frontend.getInstance().runQuery(QueryType.GetGlusterVolumeProfileInfo, parameters, aQuery);
}
use of org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters in project ovirt-engine by oVirt.
the class GetGlusterVolumeProfileInfoQueryTest method setupExpectedGlusterVolumeOptionInfo.
private void setupExpectedGlusterVolumeOptionInfo() {
params = new GlusterVolumeProfileParameters(CLUSTER_ID, VOLUME_ID);
expectedProfileInfo = new GlusterVolumeProfileInfo();
expectedProfileInfo.setVolumeId(VOLUME_ID);
expectedProfileInfo.setBrickProfileDetails(getBrickProfileDetails());
}
Aggregations