Skip to content

[6.19.z] Add locator support for OpenShift Virtualization - #2337

Merged
shubhamsg199 merged 1 commit into
6.19.zfrom
cherry-pick-6.19.z-21a03d012e0683926c480642c26b82bc63ad5f3b
Mar 12, 2026
Merged

[6.19.z] Add locator support for OpenShift Virtualization#2337
shubhamsg199 merged 1 commit into
6.19.zfrom
cherry-pick-6.19.z-21a03d012e0683926c480642c26b82bc63ad5f3b

Conversation

@Satellite-QE

Copy link
Copy Markdown
Contributor

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.

@Satellite-QE Satellite-QE added 6.19.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches labels Mar 12, 2026
@Satellite-QE Satellite-QE added the AutoMerge_Cherry_Picked Automatically merge the PR is PRT and all checks are passing label Mar 12, 2026
@Satellite-QE Satellite-QE self-assigned this Mar 12, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • 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.
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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread airgun/views/host.py
class OCPVResourceForm(View):
@View.nested
class virtual_machine(SatTab):
TAB_NAME = 'Virtual Machine'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@shubhamsg199
shubhamsg199 merged commit bb6a6e0 into 6.19.z Mar 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.19.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR AutoMerge_Cherry_Picked Automatically merge the PR is PRT and all checks are passing No-CherryPick PR doesnt need CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants