Skip to content

Add locator support for OpenShift Virtualization - #2327

Merged
shubhamsg199 merged 1 commit into
SatelliteQE:masterfrom
amolpati30:Adding_locator_to_support_OpenShift_Virtualization
Mar 12, 2026
Merged

Add locator support for OpenShift Virtualization#2327
shubhamsg199 merged 1 commit into
SatelliteQE:masterfrom
amolpati30:Adding_locator_to_support_OpenShift_Virtualization

Conversation

@amolpati30

Copy link
Copy Markdown
Contributor

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.

@amolpati30 amolpati30 added CherryPick PR needs CherryPick to previous branches AutoMerge_Cherry_Picked Automatically merge the PR is PRT and all checks are passing 6.19.z labels Feb 26, 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 left some high level feedback:

  • The XPath for the bootable checkbox in ComputeResourceOpenShiftProfileStorageItem relies on a positional div[3] and an onclick substring, which is brittle; if possible, prefer a more stable locator such as an explicit id or a less position-dependent path.
  • The new openshift_network field on BridgeForm is added but not wired into any logic in after_fill or related helpers; verify whether it should participate in the same branching/selection logic as network_type/network to avoid being silently ignored.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The XPath for the `bootable` checkbox in `ComputeResourceOpenShiftProfileStorageItem` relies on a positional `div[3]` and an `onclick` substring, which is brittle; if possible, prefer a more stable locator such as an explicit `id` or a less position-dependent path.
- The new `openshift_network` field on `BridgeForm` is added but not wired into any logic in `after_fill` or related helpers; verify whether it should participate in the same branching/selection logic as `network_type`/`network` to avoid being silently ignored.

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.

@LadislavVasina1 LadislavVasina1 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.

ACK, looks good, @amolpati30 do you have some automation using this implementation?

@amolpati30

amolpati30 commented Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

ACK, looks good, @amolpati30 do you have some automation using this implementation?

I am using those change here - SatelliteQE/robottelo#20850

@LadislavVasina1

LadislavVasina1 commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

@amolpati30 thanks for linking the robottelo PR.
With the next airgun contributions, please link the robottelo PR which is using the airgun change in the airgun PR description, thank you!

@Gauravtalreja1 Gauravtalreja1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great job @amolpati30 , added a few comments and could you also add locators for ComputeResource page so this PR covers everything related to OCP-V?

Comment thread airgun/views/host.py Outdated
root_password = TextInput(id='host_root_pass')

@provider_content.register('OpenShift Virtualization')
class OpenShiftResourceForm(View):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

just to keep naming consistent with API/Hammer

Suggested change
class OpenShiftResourceForm(View):
class OCPVComputeResourceForm(View):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@amolpati30 amolpati30 Feb 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Taking the name OCPVResource , as per listed cloud resource name.

Comment thread airgun/views/host.py Outdated
# Compute resource attributes
network_type = FilteredDropdown(id='_compute_attributes_type')
network = FilteredDropdown(id='_compute_attributes_bridge')
openshift_network = FilteredDropdown(id='_compute_attributes_network')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
openshift_network = FilteredDropdown(id='_compute_attributes_network')
ocpv_network = FilteredDropdown(id='_compute_attributes_network')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread airgun/views/host.py Outdated
# Compute resource attributes
network_type = FilteredDropdown(id='_compute_attributes_type')
network = FilteredDropdown(id='_compute_attributes_bridge')
openshift_network = FilteredDropdown(id='_compute_attributes_network')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also expose cni_provider here which would be default to multus

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@amolpati30
amolpati30 force-pushed the Adding_locator_to_support_OpenShift_Virtualization branch from 792bf06 to 8a91906 Compare February 27, 2026 08:42
@amolpati30

Copy link
Copy Markdown
Contributor Author

Great job @amolpati30 , added a few comments and could you also add locators for ComputeResource page so this PR covers everything related to OCP-V?

I have added the locator for the ComputeResource page. Could you please review it?

@amolpati30
amolpati30 force-pushed the Adding_locator_to_support_OpenShift_Virtualization branch from 8a91906 to 3c43096 Compare March 1, 2026 09:39

@sambible sambible 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.

Looks good, but I'd like to see a test utilizing the ComputeResource page locators. If that's out of scope for the robottelo PR, can we create an issue to make sure we come back and do it?

@amolpati30

Copy link
Copy Markdown
Contributor Author

Looks good, but I'd like to see a test utilizing the ComputeResource page locators. If that's out of scope for the robottelo PR, can we create an issue to make sure we come back and do it?

@sambible
This PR will perform the compute-resource action for OCP-V.

@amolpati30
amolpati30 requested a review from sambible March 10, 2026 07:13
@shubhamsg199
shubhamsg199 merged commit 21a03d0 into SatelliteQE:master Mar 12, 2026
9 checks passed
github-actions Bot pushed a commit that referenced this pull request Mar 12, 2026
amolpati30 added a commit to amolpati30/airgun that referenced this pull request Mar 12, 2026
shubhamsg199 pushed a commit that referenced this pull request Mar 12, 2026
(cherry picked from commit 21a03d0)

Co-authored-by: amolpati30 <151733635+amolpati30@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.19.z AutoMerge_Cherry_Picked Automatically merge the PR is PRT and all checks are passing CherryPick PR needs CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants