-
Notifications
You must be signed in to change notification settings - Fork 109
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
stages: Add new stage parameter to org.osbuild.ovf #1751
base: main
Are you sure you want to change the base?
Conversation
"ostype": { | ||
"description": "The kind of installed guest operating system", | ||
"type": "string", | ||
"default": "other26xLinux64Guest" |
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.
How long is the list of valid values here? Does it make sense to make it an enum to verify that only valid values are used?
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.
According to the list I found it may be quite long: https://docs.vmware.com/en/VMware-HCX/4.9/hcx-user-guide/GUID-D4FFCBD6-9FEC-44E5-9E26-1BD0A2A81389.html
Also we would need to track this list in case something will change.
This whole PR is related to QA request where they would like to be able to "eventually" overwrite default value so I guess in the normal circumstances this wount be used that frequent:)
osType used in this stage has hardcoded osType value in the template. This commit allows to overwrite this value if needed.
1e11892
to
05fbf57
Compare
@@ -22,7 +22,7 @@ OVF_TEMPLATE = """<?xml version="1.0"?> | |||
<VirtualSystem ovf:id="image"> | |||
<Info>A virtual machine</Info> | |||
<Name>VM</Name> | |||
<OperatingSystemSection ovf:id="100" vmw:osType="other26xLinux64Guest"> | |||
<OperatingSystemSection ovf:id="100" vmw:osType={"ostype"}> |
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.
<OperatingSystemSection ovf:id="100" vmw:osType={"ostype"}> | |
<OperatingSystemSection ovf:id="100" vmw:osType={ostype}> |
need to drop the quotes.
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.
Nice catch, it seems the string is also not an f-string
so that would need changing too.
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.
This looks good, once tests are added (and the issue that Achilleas found is fixed which the tests should also cover) this can go in
@@ -22,7 +22,7 @@ OVF_TEMPLATE = """<?xml version="1.0"?> | |||
<VirtualSystem ovf:id="image"> | |||
<Info>A virtual machine</Info> | |||
<Name>VM</Name> | |||
<OperatingSystemSection ovf:id="100" vmw:osType="other26xLinux64Guest"> | |||
<OperatingSystemSection ovf:id="100" vmw:osType={"ostype"}> |
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.
Nice catch, it seems the string is also not an f-string
so that would need changing too.
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.
One concern I'd have is that allowing any string allows passing in strings that will break the XML; perhaps we should either escape the value in an attribute context or define a regular expression for the acceptable field values?
This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days. |
This PR was closed because it has been stalled for 30+7 days with no activity. |
osType used in this stage has hardcoded osType value in the template. This commit allows to overwrite this value if needed.