Search in sources :

Example 1 with GlusterVolumeProfileParameters

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);
    }
}
Also used : GlusterVolumeProfileInfo(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileInfo) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) GlusterVolumeProfileDetails(org.ovirt.engine.api.model.GlusterVolumeProfileDetails) GlusterVolumeProfileParameters(org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters)

Example 2 with GlusterVolumeProfileParameters

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);
}
Also used : GlusterVolumeProfileParameters(org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters)

Example 3 with GlusterVolumeProfileParameters

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());
}
Also used : GlusterVolumeProfileInfo(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileInfo) GlusterVolumeProfileParameters(org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters)

Aggregations

GlusterVolumeProfileParameters (org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters)3 GlusterVolumeProfileInfo (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileInfo)2 GlusterVolumeProfileDetails (org.ovirt.engine.api.model.GlusterVolumeProfileDetails)1 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)1