airgun.entities.host
¶
Module Contents¶
Classes¶
Navigate to All Hosts page |
|
Navigate to Create Host page |
|
Navigate to Register Host page |
|
Navigate to Host Details page by clicking on necessary host name in the |
|
Navigate to Edit Host page by clicking on 'Edit' button for specific |
|
Navigate to Action page by selecting checkboxes for necessary hosts and |
|
Navigate to Insights recommendations page |
|
Navigate to Insights tab on host details page |
- class airgun.entities.host.HostEntity(browser)¶
- endpoint_path = /hosts¶
- HELPER_CLASS¶
- create(values)¶
Create new host entity
- get_register_command(values, full_read=None)¶
Get curl command generated on Register Host page
- search(value)¶
Search for existing host entity
- host_status(value)¶
Get Host status
- get_details(entity_name, widget_names=None)¶
Read host values from Host Details page, optionally only the widgets in widget_names will be read.
- read(entity_name, widget_names=None)¶
Read host values from Host Edit page
- read_all()¶
Read all values from hosts title page
- update(entity_name, values)¶
Update an existing host with values
- delete(entity_name, cancel=False)¶
Delete host from the system
- delete_interface(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(entity_name)¶
Get puppet external nodes YAML dump for specific host
- read_insights_recommendations(entity_name)¶
Get Insights recommendations for host
- insights_tab(entity_name)¶
Get details from Insights tab
- _select_action(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(action_name, entities_list, values=None)¶
Apply action name for host/hosts
- export()¶
Export hosts list.
- Return str
path to saved file
- schedule_remote_job(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(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(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(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(entity_name, name, value)¶
Set Puppet class parameter value
- class airgun.entities.host.ShowAllHosts(obj, navigate_obj, logger=None)¶
Navigate to All Hosts page
- 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.host.AddNewHost(obj, navigate_obj, logger=None)¶
Navigate to Create Host 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.host.RegisterHost(obj, navigate_obj, logger=None)¶
Navigate to Register Host 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.host.ShowHostDetails(obj, navigate_obj, logger=None)¶
Navigate to Host Details page by clicking on necessary host name in the table
- Parameters
entity_name – name of the host
- 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.host.EditHost(obj, navigate_obj, logger=None)¶
Navigate to Edit Host page by clicking on ‘Edit’ button for specific host in the table
- Parameters
entity_name – name of the host
- 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.host.HostsSelectAction(obj, navigate_obj, logger=None)¶
- Navigate to Action page by selecting checkboxes for necessary hosts and
then clicking on the action name button in ‘Select Action’ dropdown.
- Parameters
action_name – the action name to select from dropdown button
entities_list – list of hosts that need to be modified
- 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.
- class airgun.entities.host.ShowRecommendations(obj, navigate_obj, logger=None)¶
Navigate to Insights recommendations page
- VIEW¶
- class airgun.entities.host.InsightsTab(obj, navigate_obj, logger=None)¶
Navigate to Insights tab on host details page
- 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.