diff options
author | Martin Polden <mpolden@mpolden.no> | 2021-11-30 14:53:11 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2021-11-30 14:53:11 +0100 |
commit | 3a898779f312a7d039d860f0f63d4550e14fbe38 (patch) | |
tree | afa27ee1e5ee0e0aa563aed7f1c5359d8183a45c /config-model-api/src/main/java/com/yahoo/config/application | |
parent | d0476e64b77f9cde4324cd1bbc1366fd24281ef6 (diff) |
Make active attribute on region tag optional
This allows tenants to stop specifying the attribute, as it's unnecessary when
declaring global endpoints with the current syntax (`<endpoints>`).
Diffstat (limited to 'config-model-api/src/main/java/com/yahoo/config/application')
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java b/config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java index 6f77dce8fc5..07b8462f4d1 100644 --- a/config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java +++ b/config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java @@ -477,9 +477,10 @@ public class DeploymentSpecXmlReader { private boolean readActive(Element regionTag) { String activeValue = regionTag.getAttribute("active"); + if ("".equals(activeValue)) return true; // Default to active if ("true".equals(activeValue)) return true; if ("false".equals(activeValue)) return false; - throw new IllegalArgumentException("Region tags must have an 'active' attribute set to 'true' or 'false' " + + throw new IllegalArgumentException("Value of 'active' attribute in region tag must be 'true' or 'false' " + "to control whether this region should receive traffic from the global endpoint of this application"); } |