use of org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters in project ovirt-engine by oVirt.
the class BackendGlusterBrickResource method getStatisticsResource.
@Override
public StatisticsResource getStatisticsResource() {
EntityIdResolver<Guid> resolver = new QueryIdResolver<Guid>(QueryType.GetGlusterBrickById, IdQueryParameters.class) {
@Override
public GlusterBrickEntity lookupEntity(Guid id) throws BackendFailureException {
GlusterBrickEntity brickEntity = getEntity(GlusterBrickEntity.class, QueryType.GetGlusterBrickById, new IdQueryParameters(id), null, true);
GlusterVolumeEntity volumeEntity = getEntity(GlusterVolumeEntity.class, QueryType.GetGlusterVolumeById, new IdQueryParameters(brickEntity.getVolumeId()), null, true);
GlusterVolumeAdvancedDetails detailsEntity = getEntity(GlusterVolumeAdvancedDetails.class, QueryType.GetGlusterVolumeAdvancedDetails, new GlusterVolumeAdvancedDetailsParameters(volumeEntity.getClusterId(), volumeEntity.getId(), brickEntity.getId(), true), null, true);
brickEntity.setBrickDetails(detailsEntity.getBrickDetails().get(0));
return brickEntity;
}
};
BrickStatisticalQuery query = new BrickStatisticalQuery(resolver, newModel(id));
return inject(new BackendStatisticsResource<>(GlusterBrickEntity.class, guid, query));
}
use of org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters in project ovirt-engine by oVirt.
the class BackendGlusterBricksResource method populateAdvancedDetails.
protected GlusterBrick populateAdvancedDetails(GlusterBrick model, GlusterBrickEntity entity) {
GlusterVolumeEntity volumeEntity = getEntity(GlusterVolumeEntity.class, QueryType.GetGlusterVolumeById, new IdQueryParameters(entity.getVolumeId()), null, true);
GlusterVolumeAdvancedDetails detailsEntity = getEntity(GlusterVolumeAdvancedDetails.class, QueryType.GetGlusterVolumeAdvancedDetails, new GlusterVolumeAdvancedDetailsParameters(volumeEntity.getClusterId(), volumeEntity.getId(), entity.getId(), true), null, true);
model = getMapper(GlusterVolumeAdvancedDetails.class, GlusterBrick.class).map(detailsEntity, model);
return model;
}
use of org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getClusterGlusterServices.
public void getClusterGlusterServices(AsyncQuery<GlusterVolumeAdvancedDetails> aQuery, Guid clusterId) {
aQuery.converterCallback = new CastingConverter<>();
// Passing empty values for Volume and Brick to get the services of all the volumes/hosts in the cluster
GlusterVolumeAdvancedDetailsParameters parameters = // $NON-NLS-1$ //$NON-NLS-2$
new GlusterVolumeAdvancedDetailsParameters(clusterId, null, null, false);
Frontend.getInstance().runQuery(QueryType.GetGlusterVolumeAdvancedDetails, parameters, aQuery);
}
use of org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getGlusterVolumeBrickDetails.
public void getGlusterVolumeBrickDetails(AsyncQuery aQuery, Guid clusterId, Guid volumeId, Guid brickId) {
GlusterVolumeAdvancedDetailsParameters parameters = new GlusterVolumeAdvancedDetailsParameters(clusterId, volumeId, brickId, true);
Frontend.getInstance().runQuery(QueryType.GetGlusterVolumeAdvancedDetails, parameters, aQuery);
}
Aggregations