airgun.views.host

Module Contents

class airgun.views.host.TableActions

Bases: widgetastic.widget.View

Interface table has Action column that contains only two buttons, without any extra controls, so we cannot re-use any existing widgets

edit
delete
class airgun.views.host.PuppetClassParameterValue

Bases: widgetastic.widget.Widget

Represent value field for Puppet Class parameters table row from Host Parameters tab. That field can be interacted with as usual text input, but also it can be overridden with new value

ROOT = .//div[@class='input-group']
value
override_button
remove_override_button
hide_button
hidden

Return whether the variable is hidden

overridden

Return whether the variable is overridden, a variable is overridden if not disabled

hidden_value
read(self)

Return smart variable widget values

fill(self, value)

Set smart variable widget values

hide(self, value=True)

Hide or unhide the smart variable input box

override(self, value=True)

Click corresponding button depends on action needed

class airgun.views.host.ComputeResourceLibvirtProfileStorageItem

Bases: airgun.widgets.GenericRemovableWidgetItem

Libvirt Compute Resource profile “Storage” item widget

storage_pool
size
storage_type
class airgun.views.host.ComputeResourceGoogleProfileStorageItem

Bases: airgun.widgets.GenericRemovableWidgetItem

Google Compute Resource profile “Storage” item widget

size
class airgun.views.host.HostInterface

Bases: widgetastic.widget.View

class InterfaceForm

Bases: widgetastic.widget.View

class VirtualAttributesForm

Bases: widgetastic.widget.View

tag
attached_to
virtual_nic
virtual_attributes
class BMCForm

Bases: widgetastic.widget.View

username
password
provider
class BondForm

Bases: widgetastic.widget.View

mode
attached_devices
bond_options
class BridgeForm

Bases: widgetastic.widget.View

attached_devices
ROOT = .//div[@id='interfaceModal']
title
submit
interface_type
mac
device_identifier
dns
domain
subnet
subnet_v6
ip
ipv6
managed
primary
provision
remote_execution
interface_additional_data
network_type
network
nic_type
is_displayed
after_fill(self, was_change)

Submit the dialog data once all necessary view widgets filled

class airgun.views.host.HostsView

Bases: airgun.views.common.BaseLoggedInView, airgun.views.common.SearchableViewMixin

title
export
new
select_all
table
actions
is_displayed
class airgun.views.host.HostCreateView

Bases: airgun.views.common.BaseLoggedInView

class host

Bases: airgun.views.common.SatTab

name
organization
location
hostgroup
inherit_deploy_option
deploy
lce
content_view
content_source
reset_puppet_environment
inherit_puppet_environment
puppet_environment
puppet_master
puppet_ca
openscap_capsule
class ansible_roles

Bases: airgun.views.common.SatTab

TAB_NAME = Ansible Roles
resources
class NoResourceForm

Bases: widgetastic.widget.View

class LibvirtResourceForm

Bases: widgetastic.widget.View

class virtual_machine

Bases: airgun.views.common.SatTab

class storage

Bases: airgun.widgets.RemovableWidgetsItemsListView

ROOT = //fieldset[@id='storage_volumes']
ITEMS = ./div/div[contains(@class, 'removable-item')]
ITEM_WIDGET_CLASS
TAB_NAME = Virtual Machine
cpus
cpu_mode
memory
startup
class GoogleResourceForm

Bases: widgetastic.widget.View

class virtual_machine

Bases: airgun.views.common.SatTab

class storage

Bases: airgun.widgets.RemovableWidgetsItemsListView

ROOT = //fieldset[@id='storage_volumes']
ITEMS = ./div/div[contains(@class, 'removable-item')]
ITEM_WIDGET_CLASS
TAB_NAME = Virtual Machine
machine_type
network
external_ip
class operating_system

Bases: airgun.views.common.SatTab

TAB_NAME = Operating System
architecture
operating_system
build
image
media_type
media
ptable
disk
root_password
class interfaces

Bases: airgun.views.common.SatTab

interface
interfaces_list
add_new_interface
before_fill(self, values=None)

If we don’t want to break view.fill() procedure flow, we need to push ‘Edit’ button to open necessary dialog to be able to fill values

class puppet_classes

Bases: airgun.views.common.SatTab

TAB_NAME = Puppet Classes
config_groups
classes
class parameters

Bases: airgun.views.common.SatTab

Host parameters tab

class global_params(parent, **kwargs)

Bases: airgun.widgets.SatTable

read(self)

Return a list of dictionaries. Each dictionary consists of global parameter name, value and whether overridden or not.

override(self, name)

Override a single global parameter.

Parameters:name (str) – The name of the global parameter to override.
fill(self, names)

Override global parameter entries.

Parameters:names (list[str]) – global parameters names to override.
puppet_class_parameters
host_params
fill(self, values)

Fill the parameters tab widgets with values.

Args:
values: A dictionary of widget_name: value_to_fill.
Note:
The global_params value can be a list of names of global parameters to override or a list of dicts like [{name: global_param_name_to_override, value: new_value}…]
class additional_information

Bases: airgun.views.common.SatTab

TAB_NAME = Additional Information
owned_by
enabled
hardware_model
comment
breadcrumb
submit
is_displayed
current_provider

Retrieve the provider name from the compute resource name.

Note: The provider name is always appended to the end of the compute resource name, for example: compute resource name “foo”

  1. For RHV provider, the compute resource name will be displayed as: “foo (RHV)”
  2. For Libvirt provider, the compute resource name will be displayed as: “foo (Libvirt)”

Return “Compute resource is not specified” value in case no compute resource specified in deployment procedure (e.g. “Bare Metal”)

provider_content
class airgun.views.host.HostDetailsView

Bases: airgun.views.common.BaseLoggedInView

class properties

Bases: airgun.views.common.SatTab

properties_table
breadcrumb
is_displayed
boot_disk
schedule_remote_job
back
webconsole
edit
clone
build
delete
audits_details
facts_details
yaml_dump
yaml_output
content_details
class airgun.views.host.HostEditView

Bases: airgun.views.host.HostCreateView

breadcrumb
submit
toggle_manage
is_displayed
class airgun.views.host.HostsActionCommonDialog

Bases: airgun.views.common.BaseLoggedInView

Common base class Dialog for Hosts Actions

title
table
keep_selected
submit
is_displayed
class airgun.views.host.HostsChangeGroup

Bases: airgun.views.host.HostsActionCommonDialog

title
host_group
class airgun.views.host.HostsChangeEnvironment

Bases: airgun.views.host.HostsActionCommonDialog

title
environment
class airgun.views.host.HostsTaxonomyMismatchRadioGroup(parent, **kwargs)

Bases: widgetastic.widget.GenericLocatorWidget

Handle Taxonomy Mismatch Radio Group

Example html representation:

<form ...>
    <div class="clearfix">
        ...
    </div>
    <input type="radio" id="location_optimistic_import_yes" ..>
     Fix Location on Mismatch
    <input type="radio" id="location_optimistic_import_no" ..>
     Fail on Mismatch
</form>
taxonomy
fix_mismatch
fail_on_mismatch
buttons_text
is_displayed
_is_checked(self, widget)

Returns whether the widget is checked

read(self)

Return the text of the selected button

fill(self, value)

Select the button with text equal to value

class airgun.views.host.HostsAssignOrganization

Bases: airgun.views.host.HostsActionCommonDialog

title
organization
on_mismatch
class airgun.views.host.HostsAssignLocation

Bases: airgun.views.host.HostsActionCommonDialog

title
location
on_mismatch
class airgun.views.host.HostsAssignCompliancePolicy

Bases: airgun.views.host.HostsActionCommonDialog

title
policy
class airgun.views.host.HostsDeleteActionDialog

Bases: airgun.views.host.HostsActionCommonDialog

title
class airgun.views.host.HostsDeleteTaskDetailsView

Bases: airgun.views.task.TaskDetailsView

Hosts Delete Task Details View

class airgun.views.host.HostsJobInvocationCreateView

Bases: airgun.views.job_invocation.JobInvocationCreateView

Hosts Job Invocation Create View

class airgun.views.host.HostsJobInvocationStatusView

Bases: airgun.views.job_invocation.JobInvocationStatusView

Hosts Job Invocation Status View