-
Notifications
You must be signed in to change notification settings - Fork 7
/
repomap-schema-test.json
284 lines (284 loc) · 10.1 KB
/
repomap-schema-test.json
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://raw.githubusercontent.com/oamg/schema-test/main/repomap-schema-test.json",
"type": "object",
"title": "Repository Mapping Schema",
"description": "Repository mapping for OS migrations",
"version": "1.2.1",
"required": [
"datetime",
"version_format",
"mapping",
"repositories",
"provided_data_streams"
],
"examples": [
{
"datetime": "202107141655Z",
"version_format": "1.1.0",
"provided_data_streams": ["1.0", "2.0"],
"mapping": [
{
"source_major_version": "7",
"target_major_version": "8",
"entries": [
{
"source": "pesid1",
"target": [
"pesid2",
"pesid3"
]
}
]
}
],
"repositories": [
{
"pesid": "pesid1",
"entries": [
{
"major_version": "7",
"repoid": "some-rhel-7-repoid",
"arch": "x86_64",
"repo_type": "rpm",
"channel": "eus"
}
]
},
{
"pesid": "pesid2",
"entries": [
{
"major_version": "8",
"repoid": "some-rhel-8-repoid1",
"arch": "x86_64",
"repo_type": "rpm",
"channel": "eus"
}
]
},
{
"pesid": "pesid3",
"entries": [
{
"major_version": "8",
"repoid": "some-rhel-8-repoid2",
"arch": "x86_64",
"repo_type": "rpm",
"channel": "eus"
}
]
}
]
}
],
"properties": {
"datetime": {
"type": "string",
"title": "The datetime of the last data update.",
"description": "The expected format: YYYYMMDDhhmmZ (date -u \"+%Y%m%d%H%MZ\")",
"pattern": "^[0-9]{12}Z$",
"examples": [
"202107141655Z"
]
},
"version_format": {
"const": "1.1.0"
},
"provided_data_streams": {
"type": "array",
"title": "The list of data streams provided by this data file.",
"description": "Data streams is list of X.Y strings where X is mandatory is saying with what leapp-repository packages the data is compatible, Y is more informative for easier data identification..",
"examples": [
["1.0"],
["1.2", "2.0"]
],
"items": {
"type": "string",
"title": "Provided data stream",
"pattern": "^[1-9][0-9]*.[0-9]+$",
"examples": ["1.0", "1.1", "2.5", "10.100"]
}
},
"mapping": {
"type": "array",
"title": "The mapping of repositories between various major versions of RHEL.",
"description": "Each item contains mapping between different major versions of RHEL systems.",
"examples": [
[
{
"source_major_version": "7",
"target_major_version": "8",
"entries": [
{
"source": "pesid1",
"target": [
"pesid2",
"pesid3"
]
}
]
}
]
],
"items": {
"type": "object",
"title": "The mapping of repositories between particular major versions of RHEL.",
"description": "E.g. mapping of between RHEL 7 and RHEL 8 repositories.",
"required": [
"source_major_version",
"target_major_version",
"entries"
],
"properties": {
"source_major_version": {
"title": "The major version of the system from which repositories are mapped.",
"$ref": "#/$defs/major_version"
},
"target_major_version": {
"title": "The major version of the system to which repositories are mapped.",
"$ref": "#/$defs/major_version"
},
"entries": {
"type": "array",
"items": {
"type": "object",
"title": "Map between particular repositories (represented by PED IDs).",
"description": "Map one source repository to M target repositories (represented by PES IDs).",
"examples": [
{
"source": "pesid1",
"target": [
"pesid1",
"pesid2"
]
}
],
"required": [
"source",
"target"
],
"properties": {
"source_pesid": { "$ref": "#/$defs/pesid" },
"target_pesids": {
"title": "The list of PES IDs of target repositories",
"type": "array",
"items": { "$ref": "#/$defs/pesid" }
}
}
}
}
}
}
},
"repositories": {
"type": "array",
"title": "Repositories",
"description": "The list of all mapped repositories (includes various versions of RHEL).",
"examples": [
[
{
"pesid": "pesid1",
"entries": [
{
"major_version": "7",
"repoid": "some-rhel-7-repoid",
"arch": "x86_64",
"repo_type": "rpm",
"channel": "ga"
}
]
}
]
],
"items": {
"type": "object",
"title": "Set of repositories represented by a PES ID.",
"description": "Contains all repositories that are referred by PES IDs used in the mapping.",
"required": [
"pesid",
"entries"
],
"properties": {
"pesid": { "$ref": "#/$defs/pesid" },
"entries": {
"type": "array",
"items": { "$ref": "#/$defs/particular_repository" }
}
}
}
}
},
"$defs": {
"pesid": {
"title": "The PES ID used in the PES database.",
"description": "The PES ID refers to a set of repositories which represent alternatives of one repository. E.g. BaseOS has a little different repository ID for every architecture, channel, ...",
"type": "string",
"examples": ["pesid1", "pesid2"]
},
"major_version": {
"title": "Major version of a system.",
"description": "The major version of the system is an integer represented as string. We choose the string as it's how we deal with versions in leapp actors usually.",
"type": "string",
"pattern": "^[1-9][0-9]*$",
"examples": ["7", "8", "9", "10"]
},
"particular_repository": {
"type": "object",
"title": "The particular repository.",
"description": "Contains crucial information about the particular repository - that is accessed by packages manager.",
"required": [
"major_version",
"repoid",
"arch",
"repo_type",
"channel"
],
"properties": {
"major_version": {
"title": "The major version of the system in which the repository is present.",
"$ref": "#/$defs/major_version"
},
"repoid": {
"title": "The repository ID.",
"description": "The unique indentifier of the repository.",
"type": "string"
},
"arch": {
"enum": [
"x86_64",
"aarch64",
"ppc64le",
"s390x"
]
},
"repo_type": {
"enum": [
"rpm",
"debug",
"srpm"
]
},
"channel": {
"enum": [
"ga",
"eus",
"e4s",
"aus",
"tus",
"beta",
"els"
]
},
"rhui": {
"enum": [
"alibaba",
"aws",
"azure",
"google"
]
}
}
}
}
}