-
Notifications
You must be signed in to change notification settings - Fork 7
repomap: support distro-specific target mappings #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| "type": "object", | ||
| "title": "Repository Mapping Schema", | ||
| "description": "Repository mapping for OS migrations", | ||
| "version": "1.3.0", | ||
| "version": "1.4.0", | ||
| "required": [ | ||
| "datetime", | ||
| "version_format", | ||
|
|
@@ -15,7 +15,7 @@ | |
| "examples": [ | ||
| { | ||
| "datetime": "202107141655Z", | ||
| "version_format": "1.3.0", | ||
| "version_format": "1.4.0", | ||
| "provided_data_streams": ["1.0", "2.0"], | ||
| "mapping": [ | ||
| { | ||
|
|
@@ -24,10 +24,10 @@ | |
| "entries": [ | ||
| { | ||
| "source": "pesid1", | ||
| "target": [ | ||
| "pesid2", | ||
| "pesid3" | ||
| ] | ||
| "target": { | ||
| "default": ["pesid2", "pesid3"], | ||
| "centos": ["pesid4"] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
|
|
@@ -86,7 +86,7 @@ | |
| ] | ||
| }, | ||
| "version_format": { | ||
| "const": "1.3.0" | ||
| "const": "1.4.0" | ||
| }, | ||
| "provided_data_streams": { | ||
| "type": "array", | ||
|
|
@@ -115,10 +115,11 @@ | |
| "entries": [ | ||
| { | ||
| "source": "pesid1", | ||
| "target": [ | ||
| "pesid2", | ||
| "pesid3" | ||
| ] | ||
| "target": { | ||
| "default": ["pesid2"], | ||
| "rhel": ["pesid3"], | ||
| "centos": ["pesid4"] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
|
|
@@ -151,22 +152,33 @@ | |
| "examples": [ | ||
| { | ||
| "source": "pesid1", | ||
| "target": [ | ||
| "pesid1", | ||
| "pesid2" | ||
| ] | ||
| "target": { | ||
| "default": ["pesid1", "pesid2"], | ||
| "centos": ["pesid3"] | ||
| } | ||
| } | ||
| ], | ||
| "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" } | ||
| "source": { "$ref": "#/$defs/pesid" }, | ||
| "target": { | ||
| "type": "object", | ||
| "title": "The target repositories mapping per distro", | ||
| "description": "Map of target PES IDs keyed by 'default' or distro ID. 'default' is required as fallback; distro-specific keys override it.", | ||
| "required": ["default"], | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am unsure about this, there are 2 options I think: a) Do not require
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. b - let's always require default. at this point I cannot come up with a situation when |
||
| "propertyNames": { | ||
| "anyOf": [ | ||
| { "const": "default" }, | ||
| { "$ref": "#/$defs/distro" } | ||
| ] | ||
| }, | ||
| "additionalProperties": { | ||
| "type": "array", | ||
| "items": { "$ref": "#/$defs/pesid" } | ||
|
Comment on lines
+178
to
+180
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If anyone is unfamiliar with additionalProperties, AFAIK it is the schema for the objects values. |
||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -280,12 +292,13 @@ | |
| "description": "This identifies the cloud where the repoid is defined. E.g. aws, azure, google, alibaba.", | ||
| "type": "string" | ||
| }, | ||
| "distro": { | ||
| "title": "The Linux distribution ID.", | ||
| "description": "The unique indentifier of Linux distribution specified in /etc/os-release as 'ID'. E.g. rhel, centos.", | ||
| "type": "string" | ||
| } | ||
| "distro": { "$ref": "#/$defs/distro" } | ||
| } | ||
| }, | ||
| "distro": { | ||
| "title": "The Linux distribution ID.", | ||
| "description": "The unique identifier of Linux distribution specified in /etc/os-release as 'ID'. E.g. rhel, centos.", | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matejmatuska Actually, when I see the change, what about to call it v2.0.0?