airgun.entities.discoveryrule

Module Contents

Classes

DiscoveryRuleEntity

ShowAllDiscoveryRules

Navigate to All Discovery rules screen.

AddNewDiscoveryRule

Navigate to Create Discovery rule page.

EditDiscoveryRule

Navigate to Edit Discovery rule page.

DiscoveredRuleHosts

Navigate to discovery rule entity Associated/Discovered Hosts page by

class airgun.entities.discoveryrule.DiscoveryRuleEntity(browser)
endpoint_path = /discovery_rules
create(values)

Create new Discovery rule

Parameters

values – Parameters to be assigned to discovery rule, Name, Search, Host Group and Priority should be provided

delete(entity_name)

Delete corresponding Discovery rule

Parameters

entity_name (str) – name of the corresponding discovery rule

read(entity_name, widget_names=None)

Reads content of corresponding Discovery rule

Parameters

entity_name (str) – name of the corresponding discovery rule

Returns

dict representing tabs, with nested dicts representing fields and values

read_all()

Reads the whole discovery rules table.

Returns

list of table rows, each row is dict, attribute as key with correct value

update(entity_name, values)

Update existing Discovery rule

Parameters
  • entity_name (str) – name of the corresponding discovery rule

  • values – parameters to be changed at discovery rule

enable(entity_name)

Enable corresponding Discovery rule

Parameters

entity_name (str) – name of the corresponding discovery rule

disable(entity_name)

Disable corresponding Discovery rule

Parameters

entity_name (str) – name of the corresponding discovery rule

read_discovered_hosts(entity_name, widget_names=None)

Read Discovered hosts corresponding to Discovery rule search field.

Parameters

entity_name (str) – name of the discovery rule entity

Returns

The discovered hosts view properties

read_associated_hosts(entity_name, widget_names=None)

Read Discovery rule associated hosts.

Parameters

entity_name – name of the discovery rule entity

Returns

The hosts view properties

class airgun.entities.discoveryrule.ShowAllDiscoveryRules(obj, navigate_obj, logger=None)

Navigate to All Discovery rules screen.

VIEW
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.discoveryrule.AddNewDiscoveryRule(obj, navigate_obj, logger=None)

Navigate to Create Discovery rule page.

VIEW
prerequisite
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.discoveryrule.EditDiscoveryRule(obj, navigate_obj, logger=None)

Navigate to Edit Discovery rule page.

Parameters

entity_name – name of the discovery rule

VIEW
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.discoveryrule.DiscoveredRuleHosts(obj, navigate_obj, logger=None)

Navigate to discovery rule entity Associated/Discovered Hosts page by clicking on the action name of the entity dropdown button.

Args:

action_name: the action name to select from dropdown button. entity_name: name of the discovery rule entity.

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