Ver a proveniência

dns and test fixes

tags/v0.1.6
Jonathan Cobb há 4 anos
ascendente
cometimento
ca9c74acf1
4 ficheiros alterados com 8 adições e 9 eliminações
  1. +1
    -1
      bubble-server/src/main/java/bubble/cloud/dns/DnsServiceDriver.java
  2. +0
    -2
      bubble-server/src/main/java/bubble/cloud/dns/godaddy/GoDaddyDnsDriver.java
  3. +5
    -4
      bubble-server/src/main/java/bubble/service/boot/ActivationService.java
  4. +2
    -2
      bubble-server/src/main/java/bubble/service/cloud/GeoService.java

+ 1
- 1
bubble-server/src/main/java/bubble/cloud/dns/DnsServiceDriver.java Ver ficheiro

@@ -208,5 +208,5 @@ public interface DnsServiceDriver extends CloudServiceDriver {
return true;
}

default boolean requireSubnetNS() { return true; }
default boolean requireSubnetNS() { return false; }
}

+ 0
- 2
bubble-server/src/main/java/bubble/cloud/dns/godaddy/GoDaddyDnsDriver.java Ver ficheiro

@@ -31,8 +31,6 @@ public class GoDaddyDnsDriver extends DnsDriverBase<GoDaddyDnsConfig> {

public static final int MAX_GODADDY_RETRIES = 5;

@Override public boolean requireSubnetNS() { return false; }

@Override public Collection<DnsRecord> create(BubbleDomain domain) {
// lookup SOA and NS records for domain, they must already exist
final Collection<DnsRecord> soaRecords = readRecords(domain, urlForType(domain, SOA), domain.matchSOA());


+ 5
- 4
bubble-server/src/main/java/bubble/service/boot/ActivationService.java Ver ficheiro

@@ -109,10 +109,11 @@ public class ActivationService {
}
}
}
final boolean testMode = configuration.testMode();
if (publicDns == null) errors.addViolation("err.publicDns.noneSpecified");
if (networkStorage == null) errors.addViolation("err.storage.noneSpecified");
if (compute == null && !configuration.testMode()) errors.addViolation("err.compute.noneSpecified");
if (email == null && !configuration.testMode()) errors.addViolation("err.email.noneSpecified");
if (networkStorage == null && !testMode) errors.addViolation("err.storage.noneSpecified");
if (compute == null && !testMode) errors.addViolation("err.compute.noneSpecified");
if (email == null && !testMode) errors.addViolation("err.email.noneSpecified");
if (errors.isInvalid()) throw invalidEx(errors);

// create local storage if it was not provided
@@ -168,7 +169,7 @@ public class ActivationService {
.setName(request.getNetworkName())
.setTag(TAG_ALLOW_REGISTRATION, true)
.setTag(TAG_PARENT_ACCOUNT, account.getUuid())
.setStorage(networkStorage.getUuid())
.setStorage(networkStorage != null ? networkStorage.getUuid() : localStorage.getUuid())
.setState(BubbleNetworkState.running));

// copy data outside the network to inside the network


+ 2
- 2
bubble-server/src/main/java/bubble/service/cloud/GeoService.java Ver ficheiro

@@ -156,9 +156,9 @@ public class GeoService {
throw new SimpleViolationException("err.geoTimeService.notFound");
}

final GeoLocation location = locate(account.getUuid(), ip);
final GeoLocation location = locate(acct.get().getUuid(), ip);
if (!location.hasLatLon()) {
final List<CloudService> geocodes = cloudDAO.findByAccountAndType(account.getUuid(), CloudServiceType.geoCode);
final List<CloudService> geocodes = cloudDAO.findByAccountAndType(acct.get().getUuid(), CloudServiceType.geoCode);
if (geocodes.isEmpty()) throw new SimpleViolationException("err.geoCodeService.notFound");
final GeoCodeResult code = geocodes.get(0).getGeoCodeDriver(configuration).lookup(location);
location.setLat(code.getLat());


Carregando…
Cancelar
Guardar