airgun.entities.host¶
Module Contents¶
-
class
airgun.entities.host.HostEntity¶ Bases:
airgun.entities.base.BaseEntity-
endpoint_path= /hosts¶
-
HELPER_CLASS¶
-
create(self, values)¶ Create new host entity
-
search(self, value)¶ Search for existing host entity
-
get_details(self, entity_name, widget_names=None)¶ Read host values from Host Details page, optionally only the widgets in widget_names will be read.
-
read(self, entity_name, widget_names=None)¶ Read host values from Host Edit page
-
read_all(self)¶ Read all values from hosts title page
-
update(self, entity_name, values)¶ Update an existing host with values
-
delete(self, entity_name, cancel=False)¶ Delete host from the system
-
delete_interface(self, entity_name, interface_id)¶ Delete host network interface.
Parameters: - entity_name – The host name to delete the network interface from
- interface_id – The network interface identifier.
-
read_yaml_output(self, entity_name)¶ Get puppet external nodes YAML dump for specific host
-
_select_action(self, action_name, entities_list)¶ Navigate to all entities, select the entities, and returns the view of the selected action name from main entity select action dropdown.
-
apply_action(self, action_name, entities_list, values=None)¶ Apply action name for host/hosts
-
export(self)¶ Export hosts list.
Return str: path to saved file
-
schedule_remote_job(self, entities_list, values, timeout=60, wait_for_results=True)¶ Apply Schedule Remote Job action to the hosts names in entities_list
Parameters: - entities_list – The host names to apply the remote job.
- values – the values to fill The Job invocation view.
- timeout – The time to wait for the job to finish.
- wait_for_results – Whether to wait for the job to finish execution.
Returns: The job invocation status view values
-
play_ansible_roles(self, entities_list, timeout=60, wait_for_results=True)¶ - Play Ansible Roles on hosts names in entities_list
- If keyword ‘All’ is supplied instead of list, all hosts are selected using the checkbox from table header
Parameters: - entities_list – The host names to play the ansible roles on.
- timeout – The time to wait for the job to finish.
- wait_for_results – Whether to wait for the job to finish execution.
Returns: The job invocation status view values
-
delete_hosts(self, entities_list, timeout=60, wait_for_results=True)¶ Delete all hosts from entities list If keyword ‘All’ is supplied instead of list, all hosts are selected using the checkbox from table header
-
get_puppet_class_parameter_value(self, entity_name, name)¶ Read host Puppet class parameter value.
Parameters: - entity_name – The host name for which to read the parameter.
- name – the parameter name.
-
set_puppet_class_parameter_value(self, entity_name, name, value)¶ Set Puppet class parameter value
Parameters:
-
-
class
airgun.entities.host.ShowAllHosts¶ Bases:
airgun.navigation.NavigateStepNavigate to All Hosts page
-
VIEW¶
-
step(self, *args, **kwargs)¶
-
-
class
airgun.entities.host.AddNewHost¶ Bases:
airgun.navigation.NavigateStepNavigate to Create Host page
-
VIEW¶
-
prerequisite¶
-
step(self, *args, **kwargs)¶
-
-
class
airgun.entities.host.ShowHostDetails¶ Bases:
airgun.navigation.NavigateStepNavigate to Host Details page by clicking on necessary host name in the table
- Args:
- entity_name: name of the host
-
VIEW¶
-
prerequisite(self, *args, **kwargs)¶
-
step(self, *args, **kwargs)¶
-
class
airgun.entities.host.EditHost¶ Bases:
airgun.navigation.NavigateStepNavigate to Edit Host page by clicking on ‘Edit’ button for specific host in the table
- Args:
- entity_name: name of the host
-
VIEW¶
-
prerequisite(self, *args, **kwargs)¶
-
step(self, *args, **kwargs)¶
-
class
airgun.entities.host.HostsSelectAction¶ Bases:
airgun.navigation.NavigateStep- Navigate to Action page by selecting checkboxes for necessary 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 hosts that need to be modified
-
ACTIONS_VIEWS¶
-
prerequisite(self, *args, **kwargs)¶
-
step(self, *args, **kwargs)¶