aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2017-06-01 17:05:01 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2017-06-01 17:05:01 +0200
commitbc3ace91b60d8a3e49c46640e0de55af1374a1b1 (patch)
treefeae2f444d9b0ab95c61ebb9a4f9aa0bd81ff818 /config-model/src
parent2f8e3b5a78d75427575534d9ab551048e59cbbf2 (diff)
Allow delay in deployment schema
Diffstat (limited to 'config-model/src')
-rw-r--r--config-model/src/main/resources/schema/deployment.rnc24
-rw-r--r--config-model/src/test/schema-test-files/deployment.xml2
2 files changed, 18 insertions, 8 deletions
diff --git a/config-model/src/main/resources/schema/deployment.rnc b/config-model/src/main/resources/schema/deployment.rnc
index c8bd11d7184..d34255c7127 100644
--- a/config-model/src/main/resources/schema/deployment.rnc
+++ b/config-model/src/main/resources/schema/deployment.rnc
@@ -21,11 +21,19 @@ Staging = element staging {
text
}
-Prod =
- element prod {
- attribute global-service-id { text }?,
- element region {
- attribute active { xsd:boolean },
- 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 }?
+}
diff --git a/config-model/src/test/schema-test-files/deployment.xml b/config-model/src/test/schema-test-files/deployment.xml
index 92d59abbe53..286466eff57 100644
--- a/config-model/src/test/schema-test-files/deployment.xml
+++ b/config-model/src/test/schema-test-files/deployment.xml
@@ -4,7 +4,9 @@
<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>