Skip to content

Commit

Permalink
Update fetching & search of errata ids
Browse files Browse the repository at this point in the history
  • Loading branch information
damoore044 committed Apr 30, 2024
1 parent 3470a54 commit 5bb1e19
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 6 additions & 2 deletions airgun/entities/contenthost.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,18 @@ def install_errata(self, entity_name, errata_id, install_via='rex'):
return view.read()

def search_errata(self, entity_name, errata_id, environment=None):
"""Search for specific errata applicable for content host.
"""Search for specific errata applicable to content host.
Check the legacy Contenthost page -> Details -> Errata tab.
:param str entity_name: the content hosts name.
:param str errata_id: errata id or title, e.g. 'RHEA-2012:0055'
:param str optional environment: lifecycle environment to filter by.
"""
view = self.navigate_to(self, 'Edit', entity_name=entity_name)
view = self.navigate_to(self, 'LegacyDetails', entity_name=entity_name)
view.wait_displayed()
view.errata.search(errata_id, lce=environment)
view.errata.table.wait_displayed()
self.browser.plugin.ensure_page_safe()
return view.errata.table.read()

def read_errata_details(self, entity_name, errata_id, environment=None):
Expand Down
9 changes: 9 additions & 0 deletions airgun/entities/host_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ def apply_package_action(self, entity_name, package_name, action):
view.flash.assert_no_error()
view.flash.dismiss()

def get_errata_ids(self, entity_name):
"""Get all available errata ids from Errata tab on selected host."""
view = self.navigate_to(self, 'NewDetails', entity_name=entity_name)
view.wait_displayed()
view.content.errata.select()
view.content.errata.table.wait_displayed()
self.browser.plugin.ensure_page_safe()
return view.content.errata.table.read()

def get_errata_by_type(self, entity_name, type):
"""List errata based on type and return table"""
view = self.navigate_to(self, 'NewDetails', entity_name=entity_name)
Expand Down

0 comments on commit 5bb1e19

Please sign in to comment.