Search in sources :

Example 6 with ErrataData

use of org.ovirt.engine.core.common.businessentities.ErrataData in project ovirt-engine by oVirt.

the class GetErrataForEngineQuery method executeQueryCommand.

@Override
protected void executeQueryCommand() {
    HostProviderProxy proxy = engineProviderFinder.findEngineProvider();
    if (proxy == null) {
        getQueryReturnValue().setSucceeded(false);
        getQueryReturnValue().setExceptionString(EngineMessage.NO_FOREMAN_PROVIDER_FOR_ENGINE.name());
        getQueryReturnValue().setReturnValue(ErrataData.emptyData());
    } else {
        ErrataData errataForEngine = proxy.getErrataForHost(engineProviderFinder.getEngineHostName(), getParameters().getErrataFilter());
        setReturnValue(errataForEngine);
    }
}
Also used : ErrataData(org.ovirt.engine.core.common.businessentities.ErrataData) HostProviderProxy(org.ovirt.engine.core.bll.host.provider.HostProviderProxy)

Example 7 with ErrataData

use of org.ovirt.engine.core.common.businessentities.ErrataData in project ovirt-engine by oVirt.

the class BackendHostKatelloErrataResourceTest method getErrataData.

private ErrataData getErrataData() {
    ErrataData errataData = new ErrataData();
    errataData.setErrata(getErrata());
    return errataData;
}
Also used : ErrataData(org.ovirt.engine.core.common.businessentities.ErrataData)

Example 8 with ErrataData

use of org.ovirt.engine.core.common.businessentities.ErrataData in project ovirt-engine by oVirt.

the class BackendEngineKatelloErrataResourceTest method getErrataData.

private ErrataData getErrataData() {
    ErrataData errataData = new ErrataData();
    errataData.setErrata(getErrata());
    return errataData;
}
Also used : ErrataData(org.ovirt.engine.core.common.businessentities.ErrataData)

Example 9 with ErrataData

use of org.ovirt.engine.core.common.businessentities.ErrataData in project ovirt-engine by oVirt.

the class BackendVmKatelloErrataResourceTest method getErrataData.

private ErrataData getErrataData() {
    ErrataData errataData = new ErrataData();
    errataData.setErrata(getErrata());
    return errataData;
}
Also used : ErrataData(org.ovirt.engine.core.common.businessentities.ErrataData)

Example 10 with ErrataData

use of org.ovirt.engine.core.common.businessentities.ErrataData in project ovirt-engine by oVirt.

the class AbstractErrataListModel method runQuery.

private void runQuery(Guid guid) {
    AsyncQuery<QueryReturnValue> asyncQuery = new AsyncQuery<>(returnValue -> {
        if (returnValue.getSucceeded()) {
            ErrataData errataData = returnValue.getReturnValue();
            unfilteredResultList = errataData.getErrata();
            // manual client-side filter
            // TODO: Use filtering and pagination options by GetErrataCountsParameters.setErrataFilter(filter)
            setItems(filter(unfilteredResultList));
        } else {
            // $NON-NLS-1$
            setMessage(constants.katelloProblemRetrievingErrata() + " " + returnValue.getExceptionMessage());
        }
    });
    asyncQuery.setHandleFailure(true);
    Frontend.getInstance().runQuery(getQueryType(), new GetErrataCountsParameters(guid), asyncQuery);
}
Also used : QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) ErrataData(org.ovirt.engine.core.common.businessentities.ErrataData) GetErrataCountsParameters(org.ovirt.engine.core.common.queries.GetErrataCountsParameters)

Aggregations

ErrataData (org.ovirt.engine.core.common.businessentities.ErrataData)14 HostProviderProxy (org.ovirt.engine.core.bll.host.provider.HostProviderProxy)5 GetErrataCountsParameters (org.ovirt.engine.core.common.queries.GetErrataCountsParameters)4 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)4 KatelloErrata (org.ovirt.engine.api.model.KatelloErrata)3 VM (org.ovirt.engine.core.common.businessentities.VM)2 VdsStatic (org.ovirt.engine.core.common.businessentities.VdsStatic)2 IOException (java.io.IOException)1 ErrataCounts (org.ovirt.engine.core.common.businessentities.ErrataCounts)1 Provider (org.ovirt.engine.core.common.businessentities.Provider)1 Guid (org.ovirt.engine.core.compat.Guid)1