Skip to content

Commit 71b7ba3

Browse files
Merge pull request #47 from negillett/6065
Add directory_layouts to definitions [RHELDST-6065]
2 parents 3a1dd86 + 49f67d2 commit 71b7ba3

File tree

4 files changed

+286
-0
lines changed

4 files changed

+286
-0
lines changed

src/cdn_definitions/data.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,56 @@
22
"cfme_version_mappings": {
33
"0.0": "0.0"
44
},
5+
"directory_layouts": [
6+
{
7+
"layered_product_version": "5.8",
8+
"major_version": "6",
9+
"name": "ChannelDumpsLayout",
10+
"pattern": "(?x)^\n/\n(?:content|shadow)/\n(?P<type>aus|dist|beta|(?:retired-)?els|eus|htb|rhb|tus|e4s)/\n(?P<platform>rhel)/\n(?P<rhui>rhui/)?\n(?P<variant>[^/]+)/\n(?P<major_version>[0-9][^/]*)/\n(?:[567](?:Client|ComputeNode|Server|Workstation|Everything))/\n(?P<arch>[^/]+)/\n(?:channel\\-dumps/.+)"
11+
},
12+
{
13+
"name": "DirectoryLayoutC",
14+
"pattern": "(?x)^\n/\n(?:content|shadow)/\n(?P<type>aus|dist|beta|(?:retired-)?els|eus|htb|rhb|tus|e4s)/\n(?P<platform>rhes|rhs|cf-me)/\n(?P<rhui>rhui/)?\n(?P<variant>[^/]+)/\n(?P<major_version>[0-9])\\.(?P<minor_version>[0-9]+)/\n(?P<arch>[^/]+)/"
15+
},
16+
{
17+
"name": "DirectoryLayoutD",
18+
"pattern": "(?x)^\n(?P<up_to_minor>\n /\n (?:content|shadow)/\n (?P<type>aus|dist|beta|(?:retired-)?els|eus|fastrack|htb|rhb|tus|e4s)/\n (?P<platform>cf-me|rhel|rhevh|rhes|rhs)/\n (?P<rhui>rhui/)?(?P<variant>[^/]+)/\n (?P<major_version>[0-7][^/]*)\n)\n/\n(?P<minor_version>(?:\\$releasever|\\$[0-9]+|[34][AEW]S|[34]Desktop))/\n(?P<arch>[^/]+)/"
19+
},
20+
{
21+
"name": "DirectoryLayoutE",
22+
"pattern": "(?x)^\n/\n(?:content|shadow)/\n(?P<type>aus|dist|beta|(?:retired-)?els|eus|fastrack|htb|rhb|rc|preview|tus|e4s)/\n(?P<platform>arm|cf-me|rhel|rhevh|rhes|rhs)/\n(?P<rhui>rhui/)?\n(?P<variant>[^/]+)/\n(?P<major_version>[0-9][^./]*)/\n(?P<arch>(?:arm|aarch64|ppc64|s390x|x86_64|multiarch|\\$basearch))/"
23+
},
24+
{
25+
"name": "DirectoryLayoutF",
26+
"pattern": "(?x)^\n/\n(?:content|shadow)/\n(?P<type>aus|dist|beta|(?:retired-)?els|eus|fastrack|htb|rhb|preview|tus|e4s)/\n(?P<platform>cf-me|rhel|rhevh|rhes|rhs)/\n(?P<rhui>rhui/)?\n(?P<variant>[^/]+)/\n(?P<major_version>[0-9][^/]*)/\n(?:[567](?:Client|ComputeNode|Server|Workstation|Everything))/\n(?P<arch>(?:ppc64|s390x|x86_64|multiarch|\\$basearch))/\n(?!channel-dumps/)"
27+
},
28+
{
29+
"name": "RhelAltLayout",
30+
"pattern": "(?x)^\n/\n(?:content|shadow)/\n(?P<type>aus|dist|beta|(?:retired-)?els|eus|htb|rhb|tus|e4s)/\n(?P<platform>rhel-alt)/\n(?P<rhui>rhui/)?\n(?P<variant>[^/]+)/\n(?P<major_version>[0-9])/\n(\n (\\$releasever)|7(Server|Client|ComputeNode|Workstation)|[0-9]\\.\n (?P<minor_version>[0-9]+)\n)\n/\n(?P<vendor_arch>[^/]+)/\n(?P<arch>[^/]+)/",
31+
"platform": "rhel",
32+
"rhelalt": true
33+
},
34+
{
35+
"arch": "x86_64",
36+
"major_version": "6",
37+
"name": "ContentISOsLayout",
38+
"pattern": "(?x)^\n/\ncontent/\ncontentisos(?:/)?",
39+
"platform": "rhel",
40+
"type": "dist"
41+
},
42+
{
43+
"arch": "x86_64",
44+
"name": "SLESLayout",
45+
"pattern": "(?x)^\n/\ncontent/\n(?P<type>dist|beta)/\nsuse/server/\n(?P<major_version>11|12|15)/\n(?P<minor_version>sp[\\d])/?",
46+
"platform": "suse"
47+
},
48+
{
49+
"name": "PublicRepoFileLayout",
50+
"pattern": "(?x)^\n/\ncontent/\npublic/\nrepofiles$",
51+
"repo": "files",
52+
"type": "dist"
53+
}
54+
],
555
"env_to_releasever_mappings": {
656
"prod": {
757
"current_rhel0_beta": "0.0",

src/cdn_definitions/data.yaml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,132 @@ repo_overrides:
251251
if_created_after: "2023-06-01T14:00:00Z"
252252
key: example
253253
value: true
254+
255+
# directory_layouts is used to define DirectoryLayout objects and consist of,
256+
# at least, a name and a pattern to match against content URL. Attributes for
257+
# the DirectoryLayout object can be overridden here, otherwise an attempt will
258+
# be made to fill them from the pattern.
259+
#
260+
# Allowed value types; string, boolean, null
261+
directory_layouts:
262+
- name: ChannelDumpsLayout
263+
# "/content/<type>/<platform>/<variant>/<major>/<minor>/<arch>/channel-dumps/"
264+
pattern: |-
265+
(?x)^
266+
/
267+
(?:content|shadow)/
268+
(?P<type>aus|dist|beta|(?:retired-)?els|eus|htb|rhb|tus|e4s)/
269+
(?P<platform>rhel)/
270+
(?P<rhui>rhui/)?
271+
(?P<variant>[^/]+)/
272+
(?P<major_version>[0-9][^/]*)/
273+
(?:[567](?:Client|ComputeNode|Server|Workstation|Everything))/
274+
(?P<arch>[^/]+)/
275+
(?:channel\-dumps/.+)
276+
major_version: "6"
277+
layered_product_version: "5.8"
278+
- name: DirectoryLayoutC
279+
# "/content/<type>/<platform>/<rhui>/<variant>/<major>.<minor>/<arch>/"
280+
pattern: |-
281+
(?x)^
282+
/
283+
(?:content|shadow)/
284+
(?P<type>aus|dist|beta|(?:retired-)?els|eus|htb|rhb|tus|e4s)/
285+
(?P<platform>rhes|rhs|cf-me)/
286+
(?P<rhui>rhui/)?
287+
(?P<variant>[^/]+)/
288+
(?P<major_version>[0-9])\.(?P<minor_version>[0-9]+)/
289+
(?P<arch>[^/]+)/
290+
- name: DirectoryLayoutD
291+
# "/content/<type>/<platform>/<rhui>/<variant>/<major>/<minor>/<arch>/"
292+
pattern: |-
293+
(?x)^
294+
(?P<up_to_minor>
295+
/
296+
(?:content|shadow)/
297+
(?P<type>aus|dist|beta|(?:retired-)?els|eus|fastrack|htb|rhb|tus|e4s)/
298+
(?P<platform>cf-me|rhel|rhevh|rhes|rhs)/
299+
(?P<rhui>rhui/)?(?P<variant>[^/]+)/
300+
(?P<major_version>[0-7][^/]*)
301+
)
302+
/
303+
(?P<minor_version>(?:\$releasever|\$[0-9]+|[34][AEW]S|[34]Desktop))/
304+
(?P<arch>[^/]+)/
305+
- name: DirectoryLayoutE
306+
# "/content/<type>/<platform>/<rhui>/<variant>/<major>/<arch>/"
307+
pattern: |-
308+
(?x)^
309+
/
310+
(?:content|shadow)/
311+
(?P<type>aus|dist|beta|(?:retired-)?els|eus|fastrack|htb|rhb|rc|preview|tus|e4s)/
312+
(?P<platform>arm|cf-me|rhel|rhevh|rhes|rhs)/
313+
(?P<rhui>rhui/)?
314+
(?P<variant>[^/]+)/
315+
(?P<major_version>[0-9][^./]*)/
316+
(?P<arch>(?:arm|aarch64|ppc64|s390x|x86_64|multiarch|\$basearch))/
317+
- name: DirectoryLayoutF
318+
# "/content/<type>/<platform>/<rhui>/<variant>/<major>/<minor (no $releasever)>/<arch>/"
319+
pattern: |-
320+
(?x)^
321+
/
322+
(?:content|shadow)/
323+
(?P<type>aus|dist|beta|(?:retired-)?els|eus|fastrack|htb|rhb|preview|tus|e4s)/
324+
(?P<platform>cf-me|rhel|rhevh|rhes|rhs)/
325+
(?P<rhui>rhui/)?
326+
(?P<variant>[^/]+)/
327+
(?P<major_version>[0-9][^/]*)/
328+
(?:[567](?:Client|ComputeNode|Server|Workstation|Everything))/
329+
(?P<arch>(?:ppc64|s390x|x86_64|multiarch|\$basearch))/
330+
(?!channel-dumps/)
331+
- name: RhelAltLayout
332+
# "/content/<type>/<platform>/<rhui>/<variant>/<major>/$releasever|<major>.<minor>|7$Variant/<vendor_arch>/<arch>/"
333+
pattern: |-
334+
(?x)^
335+
/
336+
(?:content|shadow)/
337+
(?P<type>aus|dist|beta|(?:retired-)?els|eus|htb|rhb|tus|e4s)/
338+
(?P<platform>rhel-alt)/
339+
(?P<rhui>rhui/)?
340+
(?P<variant>[^/]+)/
341+
(?P<major_version>[0-9])/
342+
(
343+
(\$releasever)|7(Server|Client|ComputeNode|Workstation)|[0-9]\.
344+
(?P<minor_version>[0-9]+)
345+
)
346+
/
347+
(?P<vendor_arch>[^/]+)/
348+
(?P<arch>[^/]+)/
349+
platform: rhel
350+
rhelalt: true
351+
- name: ContentISOsLayout
352+
# "/content/contentisos/
353+
pattern: |-
354+
(?x)^
355+
/
356+
content/
357+
contentisos(?:/)?
358+
type: dist
359+
platform: rhel
360+
major_version: "6"
361+
arch: x86_64
362+
- name: SLESLayout
363+
# "/content/dist/suse/server/[11/12/15]"
364+
pattern: |-
365+
(?x)^
366+
/
367+
content/
368+
(?P<type>dist|beta)/
369+
suse/server/
370+
(?P<major_version>11|12|15)/
371+
(?P<minor_version>sp[\d])/?
372+
arch: "x86_64"
373+
platform: "suse"
374+
- name: PublicRepoFileLayout
375+
pattern: |-
376+
(?x)^
377+
/
378+
content/
379+
public/
380+
repofiles$
381+
type: dist
382+
repo: files

src/cdn_definitions/schema.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,65 @@
8080
},
8181
"type": "object"
8282
},
83+
"directory_layout": {
84+
"additionalProperties": false,
85+
"properties": {
86+
"arch": {
87+
"$ref": "#/definitions/arch"
88+
},
89+
"layered_product": {
90+
"type": "string"
91+
},
92+
"layered_product_version": {
93+
"type": "string"
94+
},
95+
"major_version": {
96+
"$ref": "#/definitions/major_version_string"
97+
},
98+
"minor_version": {
99+
"$ref": "#/definitions/major_version_string"
100+
},
101+
"name": {
102+
"type": "string"
103+
},
104+
"pattern": {
105+
"type": "string"
106+
},
107+
"platform": {
108+
"type": "string"
109+
},
110+
"product": {
111+
"type": "string"
112+
},
113+
"repo": {
114+
"type": "string"
115+
},
116+
"rhelalt": {
117+
"type": "boolean"
118+
},
119+
"rhui": {
120+
"type": "boolean"
121+
},
122+
"type": {
123+
"type": "string"
124+
},
125+
"variant": {
126+
"type": "string"
127+
}
128+
},
129+
"required": [
130+
"name",
131+
"pattern"
132+
],
133+
"type": "object"
134+
},
135+
"directory_layouts": {
136+
"items": {
137+
"$ref": "#/definitions/directory_layout"
138+
},
139+
"type": "array",
140+
"uniqueItems": true
141+
},
83142
"env_to_releasever_mapping": {
84143
"additionalProperties": false,
85144
"patternProperties": {
@@ -350,6 +409,9 @@
350409
"cfme_version_mappings": {
351410
"$ref": "#/definitions/cfme_version_mappings_list"
352411
},
412+
"directory_layouts": {
413+
"$ref": "#/definitions/directory_layouts"
414+
},
353415
"env_to_releasever_mappings": {
354416
"$ref": "#/definitions/env_to_releasever_mapping"
355417
},

src/cdn_definitions/schema.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,48 @@ definitions:
270270
$ref: "#/definitions/repo_override"
271271
additionalProperties: false
272272

273+
directory_layout:
274+
type: object
275+
properties:
276+
name:
277+
type: string
278+
pattern:
279+
type: string
280+
type:
281+
type: string
282+
variant:
283+
type: string
284+
arch:
285+
$ref: "#/definitions/arch"
286+
platform:
287+
type: string
288+
major_version:
289+
$ref: "#/definitions/major_version_string"
290+
minor_version:
291+
$ref: "#/definitions/major_version_string"
292+
rhui:
293+
type: boolean
294+
rhelalt:
295+
type: boolean
296+
product:
297+
type: string
298+
layered_product:
299+
type: string
300+
layered_product_version:
301+
type: string
302+
repo:
303+
type: string
304+
required:
305+
- name
306+
- pattern
307+
additionalProperties: false
308+
309+
directory_layouts:
310+
type: array
311+
items:
312+
$ref: "#/definitions/directory_layout"
313+
uniqueItems: true
314+
273315
type: object
274316
properties:
275317

@@ -331,4 +373,7 @@ properties:
331373
repo_overrides:
332374
$ref: "#/definitions/repo_overrides"
333375

376+
directory_layouts:
377+
$ref: "#/definitions/directory_layouts"
378+
334379
additionalProperties: false

0 commit comments

Comments
 (0)