summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/resources/schema/deployment.rnc
blob: 1e1d9ad3aa956a1f8716e21f84b988829cd6300e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# RELAX NG Compact Syntax
# Vespa Deployment file

start = element deployment {
   attribute version { "1.0" } &
   attribute major-version { text }? &
   attribute athenz-domain { xsd:string }? &
   attribute athenz-service { xsd:string }? &
   Step
}

Step =
    StepExceptInstance &
    Instance*

StepExceptInstance =
    Delay* &
    ParallelInstances* &
    Upgrade? &
    BlockChange* &
    Notifications? &
    Endpoints? &
    Test? &
    Staging? &
    Prod*

Instance = element instance {
   attribute id { xsd:string } &
   attribute athenz-domain { xsd:string }? &
   attribute athenz-service { xsd:string }? &
   StepExceptInstance
}

ParallelRegions = element parallel {
    Region*
}

ParallelInstances = element parallel {
    Instance*
}

Upgrade = element upgrade {
    attribute policy { xsd:string }
}

BlockChange = element block-change {
    attribute revision { xsd:boolean }? &
    attribute version { xsd:boolean }? &
    attribute days { xsd:string } &
    attribute hours { xsd:string } &
    attribute time-zone { xsd:string }?
}

Notifications = element notifications {
    attribute when { xsd:string }? &
    Email*
}

Email = element email {
    attribute address { xsd:string }? &
    attribute role { xsd:string }? &
    attribute when { xsd:string }?
}

Test = element test {
   attribute athenz-service { xsd:string }? &
   attribute tester-flavor { xsd:string }? &
   text
}

Staging = element staging {
   attribute athenz-service { xsd:string }? &
   attribute tester-flavor { xsd:string }? &
   text
}

Prod = element prod {
   attribute global-service-id { text }? &
   attribute athenz-service { xsd:string }? &
   attribute tester-flavor { xsd:string }? &
   Region* &
   Delay* &
   ParallelRegions*
}

Region = element region {
   attribute active { xsd:boolean } &
   text
}

Delay = element delay {
   attribute hours { xsd:long }? &
   attribute minutes { xsd:long }? &
   attribute seconds { xsd:long }?
}

EndpointRegion = element region {
    text
}

Endpoint = element endpoint {
    attribute id { xsd:string }? &
    attribute container-id { xsd:string } &
    EndpointRegion*
}

Endpoints = element endpoints {
    Endpoint+
}