Search in sources :

Example 6 with KatelloErrata

use of org.ovirt.engine.api.model.KatelloErrata in project ovirt-engine by oVirt.

the class BackendHostKatelloErrataResource method list.

@Override
public KatelloErrata list() {
    ErrataData errataData = null;
    try {
        QueryReturnValue returnValue = runQuery(QueryType.GetErrataForHost, new GetErrataCountsParameters(asGuid(hostId)));
        if (!returnValue.getSucceeded()) {
            backendFailure(returnValue.getExceptionString());
        }
        errataData = returnValue.getReturnValue();
    } catch (Exception e) {
        handleError(e, false);
    }
    if (errataData == null) {
        return new KatelloErrata();
    }
    return mapCollection(errataData.getErrata());
}
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) KatelloErrata(org.ovirt.engine.api.model.KatelloErrata)

Aggregations

KatelloErrata (org.ovirt.engine.api.model.KatelloErrata)6 ErrataData (org.ovirt.engine.core.common.businessentities.ErrataData)3 GetErrataCountsParameters (org.ovirt.engine.core.common.queries.GetErrataCountsParameters)3 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)3 Statistics (org.ovirt.engine.api.model.Statistics)2 Cdroms (org.ovirt.engine.api.model.Cdroms)1 CustomProperties (org.ovirt.engine.api.model.CustomProperties)1 DiskAttachment (org.ovirt.engine.api.model.DiskAttachment)1 DiskAttachments (org.ovirt.engine.api.model.DiskAttachments)1 Floppies (org.ovirt.engine.api.model.Floppies)1 Hooks (org.ovirt.engine.api.model.Hooks)1 Host (org.ovirt.engine.api.model.Host)1 HostType (org.ovirt.engine.api.model.HostType)1 Nics (org.ovirt.engine.api.model.Nics)1 Payloads (org.ovirt.engine.api.model.Payloads)1 Permissions (org.ovirt.engine.api.model.Permissions)1 ReportedDevices (org.ovirt.engine.api.model.ReportedDevices)1 Snapshot (org.ovirt.engine.api.model.Snapshot)1 Snapshots (org.ovirt.engine.api.model.Snapshots)1 Spm (org.ovirt.engine.api.model.Spm)1