Skip to content
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

Add more conversion fields to schema #142

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion schemas/system_profile/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,59 @@ $defs:
type: object
properties:
activity:
description: Whether the conversion activity has been done or not
description: 'conversion' for an attempted conversion to RHEL and 'analysis' for an attempted pre-conversion analysis
type: string
example: "conversion, analysis"
activity_started:
description: UTC timestamp of when the activity started
type: string
example: "2024-07-11T17:28:54.281664Z"
activity_ended:
description: UTC timestamp of when the activity started
type: string
example: "2024-07-11T17:48:47.026664Z"
success:
description: Whether the activity has finished successfully or not
type: boolean
example: true
source_os:
description: Name and version of the Linux distribution that's being converted to RHEL
type: object
properties:
name:
description: Name of the Linux distribution that's being converted to RHEL
type: string
example: "AlmaLinux, Oracle Linux"
version:
description: Version of the Linux distribution that's being converted to RHEL
type: string
example: "8.10"
target_os:
description: Name and version of RHEL to which the system is being converted to
type: object
properties:
name:
description: Target Linux distribution
type: string
example: "Red Hat Enterprise Linux"
version:
description: What version of RHEL the system is being converted to
type: string
example: "8.10"
convert2rhel_through_foreman:
description: Whether the activity has been performed using a Red Hat Satellite conversion job template. If not the property is not present.
type: integer
format: int16
minimum: 1
maximum: 1
packages_0_nevra:
description: convert2rhel rpm name, epoch, version, release, and architecture
type: string
example: "convert2rhel-0:2.0.0-1.el8.noarch"
packages_0_signature:
description: The convert2rhel rpm signature
type: string
example: "RSA/SHA256, Thu May 30 13:31:33 2024, Key ID 199e2f91fd431d51"
rhel_ai:
description: Object containing information about RHEL AI
type: object
Expand Down
16 changes: 14 additions & 2 deletions tests/utils/invalids.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,20 @@
"version": "x" * 35,
}},
{"system_update_method": "inv_method"},
{"conversions": { # Must be a boolean, not a string
"activity": "wrong"
{"conversions": { # The activity must be either "conversion" or "analysis"
"activity": True,
}},
{"conversions": {
"source_os": { # The version must be a string
"name": "AlmaLinux",
"version": 8.10
},
}},
{"conversions": { # Shall be boolean, not a stringpy
"success": "false"
}},
{"conversions": { # Must be an integer with value 1
"convert2rhel_through_foreman": True,
}},
{"rhel_ai": { # Must be a string, not a number
"variant": "RHEL AI",
Expand Down
16 changes: 15 additions & 1 deletion tests/utils/valids.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,21 @@
}},
{"system_update_method": "yum"},
{"conversions": {
"activity": True
"source_os": {
"name": "AlmaLinux",
"version": "8.10"
},
"target_os": {
"name": "Red Hat Enterprise Linux",
"version": "8.10"
},
"convert2rhel_through_foreman": 1,
"activity": "conversion",
"packages_0_nevra": "convert2rhel-0:2.0.0-1.el8.noarch",
"packages_0_signature": "RSA/SHA256, Thu May 30 13:31:33 2024, Key ID 199e2f91fd431d51",
"activity_started": "2024-07-11T17:28:54.281664Z",
"activity_ended": "2024-07-11T17:48:47.026664Z",
"success": True
}},
{"rhel_ai": {
"variant": "RHEL AI",
Expand Down