class DnsRecordService {

    public void deleteDnsRecordByFqdn(String environmentCrn, String accountId,  List<String> fqdns) throws FreeIpaClientException {
        Stack stack = stackService.getByEnvironmentCrnAndAccountId(environmentCrn, accountId);
        MDCBuilder.buildMdcContext(stack);
        FreeIpa freeIpa = freeIpaService.findByStack(stack);
        FreeIpaClient freeIpaClient = freeIpaClientFactory.getFreeIpaClientForStack(stack);
        for (DnsZone dnsZone : freeIpaClient.findAllDnsZone()) {
            LOGGER.debug("Looking for records in zone [{}]", dnsZone.getIdnsname());
            Set<DnsRecord> allDnsRecordsInZone = freeIpaClient.findAllDnsRecordInZone(dnsZone.getIdnsname());
            deleteRegularRecords(freeIpaClient, dnsZone, allDnsRecordsInZone, fqdns, freeIpa.getDomain());
            deleteSrvRecords(freeIpaClient, dnsZone, allDnsRecordsInZone, fqdns);
        }
    }

}