diff options
author | Martin Polden <mpolden@mpolden.no> | 2021-11-08 15:03:58 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2021-11-09 14:20:26 +0100 |
commit | f610c39bdec3aae45b323682b3c62687ccaa0a79 (patch) | |
tree | 4df72d472e855eed77211dd7fbc9aea816c504e3 /controller-server | |
parent | 2778deb6e0075d72392e11fb3f03a6de567e5bdc (diff) |
Rename region -> application
Diffstat (limited to 'controller-server')
2 files changed, 8 insertions, 8 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java index 5163d7eaafe..35601dd94dd 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java @@ -60,11 +60,11 @@ public class Endpoint { if (scope == Scope.zone && id != null) throw new IllegalArgumentException("Endpoint ID cannot be set for " + scope + " endpoints"); if (targets.size() != 1) throw new IllegalArgumentException("A single target must be given for " + scope + " endpoints"); } - if (scope != Scope.region && instanceName.isEmpty()) { + if (scope != Scope.application && instanceName.isEmpty()) { throw new IllegalArgumentException("Instance must be set for scope " + scope); } for (var target : targets) { - if (scope == Scope.region) { + if (scope == Scope.application) { TenantAndApplicationId owner = TenantAndApplicationId.from(target.deployment().applicationId()); if (!owner.equals(application)) { throw new IllegalArgumentException(id + " has target owned by " + owner + @@ -261,14 +261,14 @@ public class Endpoint { case zone: return "z"; case weighted: return "w"; case global: return "g"; - case region: return "r"; + case application: return "r"; } } switch (scope) { case zone: return ""; case weighted: return "w"; case global: return "global"; - case region: return "r"; + case application: return "r"; } throw new IllegalArgumentException("No scope symbol defined for " + scope + " in " + system); } @@ -360,7 +360,7 @@ public class Endpoint { * * Traffic is routed across instances according to weights specified in deployment.xml */ - region, + application, /** Endpoint points to one or more zones. Traffic is routed to the zone closest to the client */ global, @@ -377,7 +377,7 @@ public class Endpoint { /** Returns whether this scope may span multiple deployments */ public boolean multiDeployment() { - return this == region || this == global; + return this == application || this == global; } } @@ -539,7 +539,7 @@ public class Endpoint { this.targets = deployments.entrySet().stream() .map(kv -> new Target(kv.getKey(), kv.getValue())) .collect(Collectors.toUnmodifiableList()); - this.scope = Scope.region; + this.scope = Scope.application; return this; } diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/routing/RoutingPolicies.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/routing/RoutingPolicies.java index 42557da0e26..a11ea88a6a8 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/routing/RoutingPolicies.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/routing/RoutingPolicies.java @@ -212,7 +212,7 @@ public class RoutingPolicies { for (Map.Entry<RoutingId, List<RoutingPolicy>> routeEntry : routingTable.entrySet()) { RoutingId routingId = routeEntry.getKey(); EndpointList endpoints = controller.routing().readDeclaredEndpointsOf(routingId.application()) - .scope(Endpoint.Scope.region) + .scope(Endpoint.Scope.application) .named(routingId.endpointId()); if (endpoints.isEmpty()) continue; if (endpoints.size() > 1) { |