Search in sources :

Example 11 with OpenStackVolumeProvider

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

the class V3OpenStackVolumeProviderInAdapter method adapt.

@Override
public OpenStackVolumeProvider adapt(V3OpenStackVolumeProvider from) {
    OpenStackVolumeProvider to = new OpenStackVolumeProvider();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetAuthenticationUrl()) {
        to.setAuthenticationUrl(from.getAuthenticationUrl());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDataCenter()) {
        to.setDataCenter(adaptIn(from.getDataCenter()));
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetPassword()) {
        to.setPassword(from.getPassword());
    }
    if (from.isSetProperties()) {
        to.setProperties(new Properties());
        to.getProperties().getProperties().addAll(adaptIn(from.getProperties().getProperties()));
    }
    if (from.isSetRequiresAuthentication()) {
        to.setRequiresAuthentication(from.isRequiresAuthentication());
    }
    if (from.isSetTenantName()) {
        to.setTenantName(from.getTenantName());
    }
    if (from.isSetUrl()) {
        to.setUrl(from.getUrl());
    }
    if (from.isSetUsername()) {
        to.setUsername(from.getUsername());
    }
    return to;
}
Also used : V3OpenStackVolumeProvider(org.ovirt.engine.api.v3.types.V3OpenStackVolumeProvider) OpenStackVolumeProvider(org.ovirt.engine.api.model.OpenStackVolumeProvider) Properties(org.ovirt.engine.api.model.Properties)

Aggregations

OpenStackVolumeProvider (org.ovirt.engine.api.model.OpenStackVolumeProvider)11 OpenstackVolumeAuthenticationKey (org.ovirt.engine.api.model.OpenstackVolumeAuthenticationKey)2 Properties (org.ovirt.engine.api.model.Properties)2 Mapping (org.ovirt.engine.api.restapi.types.Mapping)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 WebApplicationException (javax.ws.rs.WebApplicationException)1 Test (org.junit.Test)1 DataCenter (org.ovirt.engine.api.model.DataCenter)1 OpenStackVolumeProviders (org.ovirt.engine.api.model.OpenStackVolumeProviders)1 Property (org.ovirt.engine.api.model.Property)1 AbstractBackendSubResourceTest (org.ovirt.engine.api.restapi.resource.AbstractBackendSubResourceTest)1 V3OpenStackVolumeProvider (org.ovirt.engine.api.v3.types.V3OpenStackVolumeProvider)1 Provider (org.ovirt.engine.core.common.businessentities.Provider)1 OpenStackVolumeProviderProperties (org.ovirt.engine.core.common.businessentities.storage.OpenStackVolumeProviderProperties)1