Search in sources :

Example 1 with OpenStackVolumeProviders

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

the class BackendOpenStackVolumeProvidersResource method mapCollection.

private OpenStackVolumeProviders mapCollection(List<Provider> entities) {
    OpenStackVolumeProviders collection = new OpenStackVolumeProviders();
    for (Provider entity : entities) {
        OpenStackVolumeProvider provider = map(entity);
        collection.getOpenStackVolumeProviders().add(addLinks(populate(provider, entity)));
    }
    return collection;
}
Also used : OpenStackVolumeProvider(org.ovirt.engine.api.model.OpenStackVolumeProvider) OpenStackVolumeProviders(org.ovirt.engine.api.model.OpenStackVolumeProviders) Provider(org.ovirt.engine.core.common.businessentities.Provider) OpenStackVolumeProvider(org.ovirt.engine.api.model.OpenStackVolumeProvider)

Example 2 with OpenStackVolumeProviders

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

the class V3OpenStackVolumeProvidersInAdapter method adapt.

@Override
public OpenStackVolumeProviders adapt(V3OpenStackVolumeProviders from) {
    OpenStackVolumeProviders to = new OpenStackVolumeProviders();
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetActive()) {
        to.setActive(from.getActive());
    }
    if (from.isSetSize()) {
        to.setSize(from.getSize());
    }
    if (from.isSetTotal()) {
        to.setTotal(from.getTotal());
    }
    to.getOpenStackVolumeProviders().addAll(adaptIn(from.getOpenStackVolumeProviders()));
    return to;
}
Also used : OpenStackVolumeProviders(org.ovirt.engine.api.model.OpenStackVolumeProviders) V3OpenStackVolumeProviders(org.ovirt.engine.api.v3.types.V3OpenStackVolumeProviders)

Aggregations

OpenStackVolumeProviders (org.ovirt.engine.api.model.OpenStackVolumeProviders)2 OpenStackVolumeProvider (org.ovirt.engine.api.model.OpenStackVolumeProvider)1 V3OpenStackVolumeProviders (org.ovirt.engine.api.v3.types.V3OpenStackVolumeProviders)1 Provider (org.ovirt.engine.core.common.businessentities.Provider)1