Search in sources :

Example 6 with ExternalNetworkProviderConfiguration

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

the class ExternalNetworkProviderConfigurationMapper method map.

@Mapping(from = Provider.class, to = ExternalNetworkProviderConfiguration.class)
public static ExternalNetworkProviderConfiguration map(Provider entity, ExternalNetworkProviderConfiguration template) {
    if (entity == null) {
        return template;
    }
    ExternalNetworkProviderConfiguration model = template == null ? new ExternalNetworkProviderConfiguration() : template;
    model.setId(HexUtils.string2hex(entity.getId().toString()));
    ExternalProvider externalProvider = new ExternalProvider();
    externalProvider.setId(entity.getId().toString());
    model.setExternalNetworkProvider(externalProvider);
    return model;
}
Also used : ExternalProvider(org.ovirt.engine.api.model.ExternalProvider) ExternalNetworkProviderConfiguration(org.ovirt.engine.api.model.ExternalNetworkProviderConfiguration)

Aggregations

ExternalNetworkProviderConfiguration (org.ovirt.engine.api.model.ExternalNetworkProviderConfiguration)6 Test (org.junit.Test)2 ExternalNetworkProviderConfigurations (org.ovirt.engine.api.model.ExternalNetworkProviderConfigurations)1 ExternalProvider (org.ovirt.engine.api.model.ExternalProvider)1 VdsStatic (org.ovirt.engine.core.common.businessentities.VdsStatic)1