diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-03-05 12:49:52 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-03-05 12:49:52 +0100 |
commit | 057227e623d661fe6f2e6fdb9c04614b5194e008 (patch) | |
tree | 8dcf25d9182469f72ebf9750bda1da7989ed0e7f /controller-api | |
parent | ad5f5c22b4e9a9612073eb863abf0e6441fab0ed (diff) |
Rename some things, collapse some code
Diffstat (limited to 'controller-api')
2 files changed, 8 insertions, 9 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java index f09340ce470..b8f52694b67 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java @@ -36,7 +36,7 @@ public interface TesterCloud { Optional<String> resolveHostName(HostName hostname); /** Returns the host name of the given CNAME, if any. */ - Optional<HostName> resolveCName(HostName hostName); + Optional<HostName> resolveCname(HostName hostName); enum Status { diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java index f5594e60202..eb5360bc4bc 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java @@ -5,7 +5,6 @@ import com.yahoo.config.provision.HostName; import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId; import com.yahoo.vespa.hosted.controller.api.integration.LogEntry; import com.yahoo.vespa.hosted.controller.api.integration.deployment.TesterCloud; -import com.yahoo.vespa.hosted.controller.api.integration.dns.MemoryNameService; import com.yahoo.vespa.hosted.controller.api.integration.dns.NameService; import com.yahoo.vespa.hosted.controller.api.integration.dns.Record; import com.yahoo.vespa.hosted.controller.api.integration.dns.RecordName; @@ -21,14 +20,14 @@ import static com.yahoo.vespa.hosted.controller.api.integration.deployment.Teste public class MockTesterCloud implements TesterCloud { - private final NameService cNames; + private final NameService nameService; private List<LogEntry> log = new ArrayList<>(); private Status status = NOT_STARTED; private byte[] config; - public MockTesterCloud(NameService cNames) { - this.cNames = cNames; + public MockTesterCloud(NameService nameService) { + this.nameService = nameService; } @Override @@ -61,10 +60,10 @@ public class MockTesterCloud implements TesterCloud { } @Override - public Optional<HostName> resolveCName(HostName hostName) { - return cNames.findRecords(Record.Type.CNAME, RecordName.from(hostName.value())).stream() - .findFirst() - .map(record -> HostName.from(record.data().asString().substring(0, record.data().asString().length() - 1))); + public Optional<HostName> resolveCname(HostName hostName) { + return nameService.findRecords(Record.Type.CNAME, RecordName.from(hostName.value())).stream() + .findFirst() + .map(record -> HostName.from(record.data().asString().substring(0, record.data().asString().length() - 1))); } public void add(LogEntry entry) { |