aboutsummaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorHarald Musum <musum@yahoo-inc.com>2017-06-03 09:18:28 +0200
committerGitHub <noreply@github.com>2017-06-03 09:18:28 +0200
commitd318df440206ec1599b479e9cc731ab422969d19 (patch)
tree10861c6944879a3a660d7009ff01f6a2c01a1096 /config-model
parent4f84857bdf3ed681c383311ebd5890b3c20eb311 (diff)
Revert "Revert "Revert "Bratseth/deployment delay"""
Diffstat (limited to 'config-model')
-rwxr-xr-xconfig-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java6
-rw-r--r--config-model/src/main/resources/schema/deployment.rnc24
-rw-r--r--config-model/src/test/schema-test-files/deployment.xml2
3 files changed, 11 insertions, 21 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
index dbae6851977..addf14d5e6b 100755
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
@@ -418,10 +418,10 @@ public final class ContainerCluster
private boolean zoneHasActiveRotation(Zone zone) {
return getDeploymentSpec()
- .flatMap(spec -> spec.steps().stream()
- .filter(dz -> dz.deploysTo(zone.environment(), Optional.of(zone.region())))
+ .flatMap(spec -> spec.zones().stream()
+ .filter(dz -> dz.matches(zone.environment(), Optional.of(zone.region())))
.findFirst())
- .map(step -> ((DeploymentSpec.DeclaredZone)step).active())
+ .map(DeploymentSpec.DeclaredZone::active)
.orElse(false);
}
diff --git a/config-model/src/main/resources/schema/deployment.rnc b/config-model/src/main/resources/schema/deployment.rnc
index d34255c7127..c8bd11d7184 100644
--- a/config-model/src/main/resources/schema/deployment.rnc
+++ b/config-model/src/main/resources/schema/deployment.rnc
@@ -21,19 +21,11 @@ Staging = element staging {
text
}
-Prod = element prod {
- attribute global-service-id { text }? &
- Region* &
- Delay*
-}
-
-Region = element region {
- attribute active { xsd:boolean },
- text
-}
-
-Delay = element delay {
- attribute hours { xsd:long }? &
- attribute minutes { xsd:long }? &
- attribute seconds { xsd:long }?
-}
+Prod =
+ element prod {
+ attribute global-service-id { text }?,
+ element region {
+ attribute active { xsd:boolean },
+ text
+ }*
+ }
diff --git a/config-model/src/test/schema-test-files/deployment.xml b/config-model/src/test/schema-test-files/deployment.xml
index 286466eff57..92d59abbe53 100644
--- a/config-model/src/test/schema-test-files/deployment.xml
+++ b/config-model/src/test/schema-test-files/deployment.xml
@@ -4,9 +4,7 @@
<staging/>
<prod global-service-id='qrs'>
<region active='true'>us-west-1</region>
- <delay hours='3'/>
<region active='true'>us-central-1</region>
- <delay hours='3' minutes='7' seconds='13'/>
<region active='true'>us-east-3</region>
</prod>
</deployment>