diff options
author | Valerij Fredriksen <valerijf@yahooinc.com> | 2023-03-29 12:09:51 +0200 |
---|---|---|
committer | Valerij Fredriksen <valerijf@yahooinc.com> | 2023-03-29 12:16:09 +0200 |
commit | 4b57fc3f8936eb026b5231e79f8680bd30420bab (patch) | |
tree | e89bb3a39d46433f2281c26a1722255ada39363e /controller-api | |
parent | acc09c0650ea2458ba68e62fa1fc4b4ce93e6482 (diff) |
Add method to get a zone by ID
Diffstat (limited to 'controller-api')
-rw-r--r-- | controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/zone/ZoneRegistry.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/zone/ZoneRegistry.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/zone/ZoneRegistry.java index 4956dd475de..6cdb197b307 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/zone/ZoneRegistry.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/zone/ZoneRegistry.java @@ -23,6 +23,7 @@ import com.yahoo.vespa.hosted.controller.api.integration.deployment.RunId; import java.net.URI; import java.time.Duration; import java.util.List; +import java.util.NoSuchElementException; import java.util.Optional; /** @@ -50,6 +51,9 @@ public interface ZoneRegistry { /** Returns the default region for the given environment, if one is configured */ Optional<RegionName> getDefaultRegion(Environment environment); + /** Throws {@link NoSuchElementException} if there is no such zone (in the system). */ + ZoneApi get(ZoneId zoneId); + /** Returns the URI for the config server VIP in the given zone */ URI getConfigServerVipUri(ZoneId zoneId); |