summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2019-11-29 14:34:32 +0100
committerJon Marius Venstad <venstad@gmail.com>2019-11-29 14:34:32 +0100
commitef5db6ec9efb840235504bd625d3ce6cab145e48 (patch)
tree1460e9d68c7286840a9a3733389cc48488d63d06
parentc5c7779783626c035d65334716b353a15b5d4c6f (diff)
Update deployment.rnc
-rw-r--r--config-model/src/main/resources/schema/deployment.rnc22
-rw-r--r--config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml4
-rw-r--r--config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java2
3 files changed, 21 insertions, 7 deletions
diff --git a/config-model/src/main/resources/schema/deployment.rnc b/config-model/src/main/resources/schema/deployment.rnc
index 1e1d9ad3aa9..903d2440adf 100644
--- a/config-model/src/main/resources/schema/deployment.rnc
+++ b/config-model/src/main/resources/schema/deployment.rnc
@@ -25,6 +25,11 @@ StepExceptInstance =
Staging? &
Prod*
+PrimitiveStep =
+ Delay* &
+ Region* &
+ ProdTest*
+
Instance = element instance {
attribute id { xsd:string } &
attribute athenz-domain { xsd:string }? &
@@ -32,8 +37,14 @@ Instance = element instance {
StepExceptInstance
}
-ParallelRegions = element parallel {
- Region*
+ParallelSteps = element parallel {
+ SerialSteps* &
+ PrimitiveStep*
+}
+
+SerialSteps = element steps {
+ ParallelSteps* &
+ PrimitiveStep*
}
ParallelInstances = element parallel {
@@ -81,7 +92,12 @@ Prod = element prod {
attribute tester-flavor { xsd:string }? &
Region* &
Delay* &
- ParallelRegions*
+ ProdTest* &
+ ParallelSteps*
+}
+
+ProdTest = element test {
+ text
}
Region = element region {
diff --git a/config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml b/config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml
index 2f6e9b7a1a6..8e13f0abb53 100644
--- a/config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml
+++ b/config-model/src/test/cfg/application/invalid_parallel_deployment_xml/deployment.xml
@@ -4,9 +4,7 @@
<staging/>
<prod global-service-id="query">
<parallel>
- <region active="true">us-east-3</region>
- <delay hours="1"/>
- <region active="true">us-west-1</region>
+ <instance id="hello" />
</parallel>
</prod>
</deployment>
diff --git a/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java b/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java
index 8a8b23bb0c8..932d138410e 100644
--- a/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java
+++ b/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java
@@ -226,7 +226,7 @@ public class ApplicationDeployTest {
ApplicationPackageTester.create(tmpDir.getAbsolutePath());
fail("Expected exception");
} catch (IllegalArgumentException e) {
- assertEquals("XML error in deployment.xml: element \"delay\" not allowed here; expected the element end-tag or element \"region\" [8:25], input:\n", e.getMessage());
+ assertEquals("XML error in deployment.xml: element \"instance\" not allowed here; expected the element end-tag or element \"delay\", \"region\", \"steps\" or \"test\" [7:30], input:\n", e.getMessage());
}
}