[6.19.z] Add locator support for OpenShift Virtualization - #2337
Merged
shubhamsg199 merged 1 commit intoMar 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In
OCPVResourceForm, both thevirtual_machineandstoragenested tabs useTAB_NAME = 'Virtual Machine', which will likely confuse the tab resolution logic; make sure thestoragetab’sTAB_NAMEmatches the actual Storage tab label in the UI. - The
storage.storage_classlocator currently points only to the container XPath (storage_volumes); consider narrowing it to the specific input/select element (similar tosizeandbootable) to avoid ambiguity if multiple elements exist within each volume row.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `OCPVResourceForm`, both the `virtual_machine` and `storage` nested tabs use `TAB_NAME = 'Virtual Machine'`, which will likely confuse the tab resolution logic; make sure the `storage` tab’s `TAB_NAME` matches the actual Storage tab label in the UI.
- The `storage.storage_class` locator currently points only to the container XPath (`storage_volumes`); consider narrowing it to the specific input/select element (similar to `size` and `bootable`) to avoid ambiguity if multiple elements exist within each volume row.
## Individual Comments
### Comment 1
<location path="airgun/views/host.py" line_range="406-400" />
<code_context>
+ startup = Checkbox(id='host_compute_attributes_start')
+
+ @View.nested
+ class storage(SatTab):
+ TAB_NAME = 'Virtual Machine'
+ storage_volumes = (
+ ".//fieldset[@id='storage_volumes']/div/div[contains(@class,'removable-item')]"
</code_context>
<issue_to_address>
**issue (bug_risk):** Using the same TAB_NAME for both `virtual_machine` and `storage` may cause tab selection issues.
If this value is used as a selector/key in navigation, the duplicate `TAB_NAME` can cause the wrong tab to open or make one tab inaccessible. Please give `storage` a unique `TAB_NAME` that matches its UI label.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| class OCPVResourceForm(View): | ||
| @View.nested | ||
| class virtual_machine(SatTab): | ||
| TAB_NAME = 'Virtual Machine' |
Contributor
There was a problem hiding this comment.
issue (bug_risk): Using the same TAB_NAME for both virtual_machine and storage may cause tab selection issues.
If this value is used as a selector/key in navigation, the duplicate TAB_NAME can cause the wrong tab to open or make one tab inaccessible. Please give storage a unique TAB_NAME that matches its UI label.
(cherry picked from commit 21a03d0)
amolpati30
force-pushed
the
cherry-pick-6.19.z-21a03d012e0683926c480642c26b82bc63ad5f3b
branch
from
March 12, 2026 11:07
79959d3 to
4fbb4a2
Compare
shubhamsg199
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherrypick of PR: #2327
This change introduces locator support for OpenShift Virtualization. With this enhancement, during host creation, the automation framework will dynamically resolve the appropriate UI elements and navigation paths specific to OpenShift Virtualization, ensuring the correct workflow is executed.