Examples of DnsZone


Examples of io.fathom.cloud.dns.model.DnsZone

    @Override
    public List<DnsZone> listZones(Project project) throws CloudException {
        List<DnsZone> records = Lists.newArrayList();
        for (DnsZoneData data : repository.getDnsZones(project.getId()).list()) {
            DnsZone record = new DnsZone(data);
            records.add(record);
        }
        return records;
    }
View Full Code Here

Examples of io.fathom.cloud.dns.model.DnsZone

            data.setBackendId(backendId);
        }

        DnsZoneData created = repository.getDnsZones(project.getId()).create(data);

        DnsZone dnsDomain = new DnsZone(created);
        backend.updateDomain(project, dnsDomain);
        return dnsDomain;
    }
View Full Code Here

Examples of io.fathom.cloud.dns.model.DnsZone

        NumberedItemCollection<DnsZoneData> dnsDomains = repository.getDnsZones(project.getId());
        DnsZoneData data = dnsDomains.findByKey(zoneName);
        if (data == null) {
            return null;
        }
        return new DnsZone(data);
    }
View Full Code Here

Examples of io.fathom.cloud.dns.model.DnsZone

    public DnsZone findDomain(Project project, long id) throws CloudException {
        DnsZoneData data = repository.getDnsZones(project.getId()).find(id);
        if (data == null) {
            return null;
        }
        return new DnsZone(data);
    }
View Full Code Here

Examples of io.fathom.cloud.dns.model.DnsZone

            // String name = findHost(recordset.fqdn, domainName);

            DnsZoneSpec zoneSpec = new DnsZoneSpec();
            zoneSpec.name = domainName;

            DnsZone zone = findOrCreateDomain(project, zoneSpec);

            DnsRecordsetData.Builder data = DnsRecordsetData.newBuilder();
            data.setProjectId(project.getId());

            for (DnsRecordSpec record : recordsetSpec.records) {
                // Sanity check
                InetAddress address = InetAddresses.forString(record.address);
                String ip = InetAddresses.toAddrString(address);

                DnsRecordData.Builder recordBuilder = data.addRecordBuilder();
                recordBuilder.setTarget(ip);
            }

            data.setType(recordsetSpec.type);
            data.setFqdn(recordsetSpec.fqdn);
            data.setZoneId(zone.getId());
            data.setSystemKey(systemKey);

            recordsets.add(data.build());
        }
View Full Code Here

Examples of io.fathom.cloud.dns.model.DnsZone

                dirtyDomains.add(r.getZoneId());
            }
        }

        for (Long domainId : dirtyDomains) {
            DnsZone zone = findDomain(project, domainId);

            DnsBackend backend = findBackend(zone);

            backend.updateDomain(project, zone);
        }
View Full Code Here

Examples of io.fathom.cloud.dns.model.DnsZone

            backend.updateDomain(project, zone);
        }
    }

    private DnsZone findOrCreateDomain(Project project, DnsZoneSpec zoneSpec) throws CloudException {
        DnsZone zone = findZoneByName(project, zoneSpec.name);

        if (zone == null) {
            try {
                zone = createZone(project, zoneSpec);
            } catch (DuplicateValueException e) {
View Full Code Here

Examples of io.fathom.cloud.dns.model.DnsZone

                return null;
            }

            DnsZoneData data = store.findByKey(name);
            if (data != null) {
                return new DnsZone(data);
            }

            int dotIndex = name.indexOf('.');
            if (dotIndex == -1) {
                return null;
View Full Code Here

Examples of org.platformlayer.service.dns.model.DnsZone

    if (matches.size() != 1) {
      throw new OpsException("Picking between multiple matching zones not yet implemented");
    }

    DnsZone dnsZone = matches.get(0);

    return buildDnsFile(dnsZone);
  }
View Full Code Here

Examples of org.platformlayer.service.dns.model.DnsZone

        throw new IllegalArgumentException("Record type not supported: " + model.recordType);
      }
    }

    if (item instanceof DnsZone) {
      DnsZone model = (DnsZone) item;

      model.dnsName = normalize(model.dnsName);
      if (Strings.isNullOrEmpty(model.dnsName)) {
        model.dnsName = normalize(model.getId());
      }
    }

    super.beforeCreateItem(item);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.