airgun.entities.contentviewfilter

Module Contents

Classes

ContentViewFilterEntity

ShowAllContentViewFilters

Navigate to All Content View Filters screen by proceeding through

AddNewContentViewFilter

Navigate to New Content View Filter screen.

EditContentViewFilter

Navigate to Edit Content View Filter screen.

class airgun.entities.contentviewfilter.ContentViewFilterEntity(browser)
create(cv_name, values)

Create a new content view filter

delete(cv_name, filter_name)

Delete existing content view filter

search(cv_name, value)

Search for content view filter

read(cv_name, filter_name, widget_names=None)

Read content view filter values

update(cv_name, filter_name, values)

Update content view filter.

Parameters
  • cv_name (str) – content view name

  • filter_name (str) – content view filter name

  • values (dict) – dictionary with new values

update_repositories(cv_name, filter_name, repositories=None)

Update affected by content view filter repositories.

Parameters
  • cv_name (str) – content view name

  • filter_name (str) – content view filter name

  • repositories (list optional) – list of affected repositories. If not provided - all repositories will be affected.

add_package_rule(cv_name, filter_name, rpm_name, architecture, version)

Add package rule to RPM content view filter.

Parameters
  • cv_name (str) – content view name

  • filter_name (str) – content view filter name

  • rpm_name (str) – affected package (RPM) name

  • architecture (str) – affected architecture

  • version (tuple) – tuple containing version values according to UI (e.g. (‘Equal To’, ‘5.21-1’) or (‘Range’, ‘4.1’, ‘4.6’)

_find_rpm_rules(table, rpm_name=None, architecture=None, version=None)

Form proper rpm rows list according to search criteria

Parameters
  • table – specify table where rows should be searched for

  • rpm_name – RPM package name

  • architecture – RPM architecture name

  • version – RPM version

Returns

rows list

update_package_rule(cv_name, filter_name, rpm_name, new_values, architecture=None, version=None)

Update package rule of RPM content view filter.

Parameters
  • cv_name (str) – content view name

  • filter_name (str) – content view filter name

  • rpm_name (str) – existing package (RPM) name

  • new_values (dict) – dictionary with new values where keys are the same as column names on UI: ‘RPM Name’, ‘Architecture’, ‘Version’.

  • architecture (str optional) – filter package rule by its architecture

  • version (str optional) – filter package rule by its version (string value with exact correspondence to UI)

search_package_rule(cv_name, filter_name, query)

Search for specific package rule in RPM content view filter.

Parameters
  • cv_name (str) – content view name

  • filter_name (str) – content view filter name

  • query (str) – search query

remove_package_rule(cv_name, filter_name, rpm_name, architecture=None, version=None)

Remove specific package rule from RPM content view filter.

Parameters
  • cv_name (str) – content view name

  • filter_name (str) – content view filter name

  • rpm_name (str) – existing package (RPM) name

  • architecture (str optional) – filter package rule by its architecture

  • version (str optional) – filter package rule by its version (string value with exact correspondence to UI)

add_errata(cv_name, filter_name, errata_id=None, search_filters=None)

Add errata to errata content view filter.

Parameters
  • cv_name (str) – content view name

  • filter_name (str) – content view filter name

  • errata_id (str optional) – errata ID. If not provided - all available will be added instead (taking into consideration applied search filters)

  • search_filters (dict) – search filters to apply before adding errata. Dictionary where keys are widget names and values are widget values accordingly

add_package_group(cv_name, filter_name, package_group)

Add package group to package group content view filter.

Parameters
  • cv_name (str) – content view name

  • filter_name (str) – content view filter name

  • package_group (str) – package group name

add_module_stream(cv_name, filter_name, module_stream_query)

Add module stream to module stream content view filter.

Parameters
  • cv_name (str) – content view name

  • filter_name (str) – content view filter name

  • module_stream_query (str) – module stream query with name and stream version

class airgun.entities.contentviewfilter.ShowAllContentViewFilters(obj, navigate_obj, logger=None)

Navigate to All Content View Filters screen by proceeding through Content View -> Yum Content -> Filters tab.

Parameters

cv_name – name of content view

VIEW
am_i_here(*args, **kwargs)

Describes if the navigation is already at the requested destination.

By default, airgun relies on view’s is_displayed property to determine whether navigation succeeded. If positional argument entity_name was passed and view has BreadCrumb widget, it will also ensure second location in breadcrumb is provided entity name.

This method may be overridden on specific entity’s NavigateStep level for more complex logic if needed.

Returns

whether navigator is at requested destination or not.

Return type

bool

prerequisite(*args, **kwargs)

Describes a step that must be carried our prior to this one.

This often calls a previous navigate_to, often using one of the helpers, NavigateToSibling which will navigate to a given destination using the same object, or NavigateToAttribute which will navigate to a destination against an object describe by the attribute of the parent object.

This is a default and is generally overridden.

step(*args, **kwargs)

Describes the work to be done to get to the destination after the prequisite is met.

This is a default and is generally overridden.

class airgun.entities.contentviewfilter.AddNewContentViewFilter(obj, navigate_obj, logger=None)

Navigate to New Content View Filter screen.

Parameters

cv_name – name of content view

VIEW
am_i_here(*args, **kwargs)

Describes if the navigation is already at the requested destination.

By default, airgun relies on view’s is_displayed property to determine whether navigation succeeded. If positional argument entity_name was passed and view has BreadCrumb widget, it will also ensure second location in breadcrumb is provided entity name.

This method may be overridden on specific entity’s NavigateStep level for more complex logic if needed.

Returns

whether navigator is at requested destination or not.

Return type

bool

prerequisite(*args, **kwargs)

Describes a step that must be carried our prior to this one.

This often calls a previous navigate_to, often using one of the helpers, NavigateToSibling which will navigate to a given destination using the same object, or NavigateToAttribute which will navigate to a destination against an object describe by the attribute of the parent object.

This is a default and is generally overridden.

step(*args, **kwargs)

Describes the work to be done to get to the destination after the prequisite is met.

This is a default and is generally overridden.

class airgun.entities.contentviewfilter.EditContentViewFilter(obj, navigate_obj, logger=None)

Navigate to Edit Content View Filter screen.

Parameters
  • cv_name – name of content view

  • filter_name – name of content view filter

VIEW
am_i_here(*args, **kwargs)

Describes if the navigation is already at the requested destination.

By default, airgun relies on view’s is_displayed property to determine whether navigation succeeded. If positional argument entity_name was passed and view has BreadCrumb widget, it will also ensure second location in breadcrumb is provided entity name.

This method may be overridden on specific entity’s NavigateStep level for more complex logic if needed.

Returns

whether navigator is at requested destination or not.

Return type

bool

resetter(*args, **kwargs)

Refresh the page as it won’t be possible to read dynamically added/updated package filter rows otherwise.

prerequisite(*args, **kwargs)

Describes a step that must be carried our prior to this one.

This often calls a previous navigate_to, often using one of the helpers, NavigateToSibling which will navigate to a given destination using the same object, or NavigateToAttribute which will navigate to a destination against an object describe by the attribute of the parent object.

This is a default and is generally overridden.

step(*args, **kwargs)

Describes the work to be done to get to the destination after the prequisite is met.

This is a default and is generally overridden.