Search in sources :

Example 1 with DnsResolverConfiguration

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

the class DnsResolverConfigurationMapper method map.

public static DnsResolverConfiguration map(org.ovirt.engine.core.common.businessentities.network.DnsResolverConfiguration entity) {
    if (entity == null) {
        return null;
    }
    List<NameServer> nameServers = entity.getNameServers();
    if (nameServers == null) {
        return null;
    }
    List<String> nameServerAddresses = nameServers.stream().map(NameServer::getAddress).collect(toList());
    DnsResolverConfiguration dnsResolverConfiguration = new DnsResolverConfiguration();
    dnsResolverConfiguration.setNameServers(mapAddressesToNameServerList(nameServerAddresses));
    return dnsResolverConfiguration;
}
Also used : NameServer(org.ovirt.engine.core.common.businessentities.network.NameServer) DnsResolverConfiguration(org.ovirt.engine.api.model.DnsResolverConfiguration)

Aggregations

DnsResolverConfiguration (org.ovirt.engine.api.model.DnsResolverConfiguration)1 NameServer (org.ovirt.engine.core.common.businessentities.network.NameServer)1