Search in sources :

Example 1 with ClusterFeatures

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

the class BackendClusterEnabledFeaturesResource method list.

@Override
public ClusterFeatures list() {
    ClusterFeatures features = new ClusterFeatures();
    Set<SupportedAdditionalClusterFeature> addlFeatures = getOptionalEntity(Set.class, QueryType.GetClusterFeaturesByClusterId, new IdQueryParameters(clusterId), clusterId.toString(), false);
    if (addlFeatures != null) {
        for (SupportedAdditionalClusterFeature entity : addlFeatures) {
            if (entity.isEnabled()) {
                features.getClusterFeatures().add(addLinks(map(entity.getFeature(), null)));
            }
        }
    }
    return features;
}
Also used : IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) SupportedAdditionalClusterFeature(org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature) ClusterFeatures(org.ovirt.engine.api.model.ClusterFeatures)

Example 2 with ClusterFeatures

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

the class BackendClusterFeaturesResource method list.

@Override
public ClusterFeatures list() {
    ClusterFeatures features = new ClusterFeatures();
    Set<AdditionalFeature> addlFeatures = BackendClusterFeatureHelper.getClusterFeatures(this, version);
    addlFeatures.forEach(clusterFeature -> {
        org.ovirt.engine.api.model.ClusterFeature feature = addLinks(map(clusterFeature, null));
        features.getClusterFeatures().add(feature);
    });
    return features;
}
Also used : AdditionalFeature(org.ovirt.engine.core.common.businessentities.AdditionalFeature) ClusterFeature(org.ovirt.engine.api.model.ClusterFeature) ClusterFeatures(org.ovirt.engine.api.model.ClusterFeatures)

Aggregations

ClusterFeatures (org.ovirt.engine.api.model.ClusterFeatures)2 ClusterFeature (org.ovirt.engine.api.model.ClusterFeature)1 AdditionalFeature (org.ovirt.engine.core.common.businessentities.AdditionalFeature)1 SupportedAdditionalClusterFeature (org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature)1 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)1