airgun.entities.discoveryrule

Module Contents

class airgun.entities.discoveryrule.DiscoveryRuleEntity

Bases: airgun.entities.base.BaseEntity

endpoint_path = /discovery_rules
create(self, values)

Create new Discovery rule

Parameters:values – Parameters to be assigned to discovery rule, Name, Search, Host Group and Priority should be provided
delete(self, entity_name)

Delete corresponding Discovery rule

Parameters:entity_name (str) – name of the corresponding discovery rule
read(self, 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(self)

Reads the whole discovery rules table.

Returns:list of table rows, each row is dict, attribute as key with correct value
update(self, 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(self, entity_name)

Enable corresponding Discovery rule

Parameters:entity_name (str) – name of the corresponding discovery rule
disable(self, entity_name)

Disable corresponding Discovery rule

Parameters:entity_name (str) – name of the corresponding discovery rule
read_discovered_hosts(self, 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(self, 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

Bases: airgun.navigation.NavigateStep

Navigate to All Discovery rules screen.

VIEW
step(self, *args, **kwargs)
class airgun.entities.discoveryrule.AddNewDiscoveryRule

Bases: airgun.navigation.NavigateStep

Navigate to Create Discovery rule page.

VIEW
prerequisite
step(self, *args, **kwargs)
class airgun.entities.discoveryrule.EditDiscoveryRule

Bases: airgun.navigation.NavigateStep

Navigate to Edit Discovery rule page.

Args:
entity_name: name of the discovery rule
VIEW
prerequisite(self, *args, **kwargs)
step(self, *args, **kwargs)
class airgun.entities.discoveryrule.DiscoveredRuleHosts

Bases: airgun.navigation.NavigateStep

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(self, *args, **kwargs)
step(self, *args, **kwargs)