airgun.entities.discoveredhosts

Module Contents

class airgun.entities.discoveredhosts.DiscoveredHostsEntity

Bases: airgun.entities.base.BaseEntity

endpoint_path = /discovered_hosts
wait_for_entity(self, entity_name)

Wait for a host to be discovered providing the expected entity_name

Note: When no discovered host exists is in the system, the search box
does not exist in the DOM, and as we are waiting for a host to be discovered we have to ensure that the view became searchable.

:raise TimedOutError if the view will not became searchable in time :raise TimedOutError if the host is not discovered in time :returns the entity table row columns values

search(self, value)

Search for ‘value’ and return discovery hosts values that match.

Parameters:value (str) – filter text.
delete(self, entity_name)

Delete discovered host with name entity_name

read(self, entity_name, widget_names=None)

Return a dict with properties of discovered host.

provision(self, entity_name, host_group, organization, location, quick=True, host_values=None)

Provision a discovered host with name entity_name.

Parameters:
  • entity_name (str) – The discovered host name.
  • host_group (str) – The hostgroup to select for the host provisioning.
  • organization (str) – The Organization to select for the host provisioning.
  • location (str) – the Location to select for host provisioning.
  • quick (bool) – Whether to proceed to provisioning with default values. If not a custom host edit dialog will appear to edit the custom values.
  • host_values (dict) – The custom host provisioning values to fill the custom host view that appear in case of not quick procedure.
apply_action(self, action_name, entities_list, values=None)

Apply action name for discovered hosts.

Parameters:
  • action_name (str) – The action name to apply, available: ‘Assign Location’, ‘Assign Organization’, ‘Auto Provision’, ‘Delete’, ‘Reboot’
  • str entities_list (list) – Discovered hosts name list.
  • values (dict) – The values to fill the action form dialog with.
class airgun.entities.discoveredhosts.ShowAllDiscoveredHosts

Bases: airgun.navigation.NavigateStep

Navigate to All Discovered hosts screen.

VIEW
step(self, *args, **kwargs)
class airgun.entities.discoveredhosts.ShowDiscoveredHostDetailsView

Bases: airgun.navigation.NavigateStep

Navigate to Discovered Host details screen.

VIEW
prerequisite(self, *args, **kwargs)
step(self, *args, **kwargs)
class airgun.entities.discoveredhosts.DiscoveredHostsSelectAction

Bases: airgun.navigation.NavigateStep

Navigate to Action page by selecting checkboxes for necessary discovered hosts and then clicking on the action name button in ‘Select Action’ dropdown.

Args:
action_name: the action name to select from dropdown button entities_list: list of discovered hosts that need to apply action on.
ACTIONS_VIEWS
prerequisite(self, *args, **kwargs)
step(self, *args, **kwargs)
class airgun.entities.discoveredhosts.DiscoveredHostProvisionActionNavigation

Bases: airgun.navigation.NavigateStep

VIEW
prerequisite(self, *args, **kwargs)
step(self, *args, **kwargs)