Skip to content

Commit

Permalink
Rex targetting (SatelliteQE#1262)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhellebr authored Mar 5, 2024
1 parent 478a2bf commit 0a57c14
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions airgun/entities/job_invocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ def get_targeted_hosts(self):
time.sleep(3)
return view.target_hosts_and_inputs.read()

def read_hostgroups(self):
"""Read host groups in selection"""
view = self.navigate_to(self, 'Run')
view.fill(
{
'category_and_template.job_category': 'Commands',
'category_and_template.job_template': 'Run Command - Script Default',
'target_hosts_and_inputs.targetting_type': 'Host groups',
}
)
return view.target_hosts_and_inputs.targets.items


@navigator.register(JobInvocationEntity, 'All')
class ShowAllJobs(NavigateStep):
Expand Down
6 changes: 6 additions & 0 deletions airgun/views/job_invocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ class target_hosts_and_inputs(WizardStepView):
ansible_roles_list = TextInput(id='ansible_roles_list')
power_action = OUIASelect('OUIA-Generated-Select-single-34')

targetting_type = Select(locator='//div[button[@aria-haspopup="listbox"]]')
# https://bugzilla.redhat.com/show_bug.cgi?id=2265127
targets = Select(
locator='//div[contains(@data-ouia-component-id,"OUIA-Generated-Select-typeaheadmulti-")]'
)

@View.nested
class advanced_fields(WizardStepView):
expander = Text(".//button[contains(.,'Advanced fields')]")
Expand Down

0 comments on commit 0a57c14

Please sign in to comment.