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;
}
Aggregations