airgun.views.computeresource

Module Contents

Classes

ComputeResourcesView

Base view for Satellite pages

ResourceProviderCreateView

Base view for Satellite pages

ResourceProviderEditView

Base view for Satellite pages

ResourceProviderDetailView

Base view for Satellite pages

ComputeResourceLibvirtProfileNetworkItem

Libvirt Compute Resource Profile "Network interface" item widget

ComputeResourceLibvirtProfileStorageItem

Libvirt Compute Resource profile "Storage" item widget

ComputeResourceRHVProfileNetworkItem

RHV Compute Resource profile "Network interface" item widget

ComputeResourceRHVProfileStorageItem

RHV Compute Resource profile "Storage" item widget

ComputeResourceVMwareProfileNetworkItem

VMware Compute Resource Profile "Network interface" item widget

ComputeResourceVMwareProfileControllerVolumeItem

VMware Compute Resource Profile "Storage Controller Volume" item widget

ComputeResourceVMwareProfileControllerVolumeList

VMware Compute Resource Profile SCSI Controller Volumes List

ComputeResourceVMwareProfileStorageItem

VMware Compute Resource Profile Storage Controller item widget

ResourceProviderProfileView

Base view for Satellite pages

ResourceProviderVMImport

Base view for Satellite pages

ComputeResourceGenericImageCreateView

A Generic Compute Resource Image create view.

ComputeResourceGenericImageEditViewMixin

A Generic Mixin Resource Image edit view.

ComputeResourceRHVImageCreateView

RHV Compute resource Image create view.

ComputeResourceRHVImageEditView

RHV Compute resource Image edit view.

ComputeResourceVMwareImageCreateView

VMWare ComputeResource Image create View

ComputeResourceVMwareImageEditView

VMWare ComputeResource Image edit View

class airgun.views.computeresource.ComputeResourcesView(parent, logger=None, **kwargs)

Base view for Satellite pages

title
new
table
property is_displayed

Check if the right page is displayed

class airgun.views.computeresource.ResourceProviderCreateView(parent, logger=None, **kwargs)

Base view for Satellite pages

class EC2ProviderForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

class region(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

load_regions
value
before_fill(values=None)

A hook invoked before the loop of filling is invoked.

If it returns None, the was_changed in fill() does not change. If it returns a boolean, then on True it modifies the was_changed to True as well.

Parameters

values – The same values that are passed to fill()

class http_proxy(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

value
access_key
secret_key
class GCEProviderForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

class zone(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

load_zones
value
before_fill(values=None)

A hook invoked before the loop of filling is invoked.

If it returns None, the was_changed in fill() does not change. If it returns a boolean, then on True it modifies the was_changed to True as well.

Parameters

values – The same values that are passed to fill()

class http_proxy(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

value
google_project_id
client_email
certificate_path
class LibvirtProviderForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

url
display_type
console_passwords
class OpenStackProviderForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

url
user
password
domain
class RackspaceProviderForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

url
user
api_key
region
class VMwareProviderForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

class datacenter(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

load_datacenters
value
before_fill(values=None)

A hook invoked before the loop of filling is invoked.

If it returns None, the was_changed in fill() does not change. If it returns a boolean, then on True it modifies the was_changed to True as well.

Parameters

values – The same values that are passed to fill()

vcenter
user
password
display_type
vnc_console_passwords
enable_caching
class RHVProviderForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

class datacenter(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

load_datacenters
value
before_fill(values=None)

A hook invoked before the loop of filling is invoked.

If it returns None, the was_changed in fill() does not change. If it returns a boolean, then on True it modifies the was_changed to True as well.

Parameters

values – The same values that are passed to fill()

url
user
password
certification_authorities
class compute_resource(parent, logger=None, **kwargs)

Regular primary level Tab.

Usage:

@View.nested
class mytab(SatTab):
    TAB_NAME = 'My Tab'
@View.nested
class subscriptions(SatTab):
    # no need to specify 'TAB_NAME', it will be set to 'Subscriptions'
    # automatically
    pass

Note that TAB_NAME is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’

TAB_NAME = Compute Resource
class locations(parent, logger=None, **kwargs)

Regular primary level Tab.

Usage:

@View.nested
class mytab(SatTab):
    TAB_NAME = 'My Tab'
@View.nested
class subscriptions(SatTab):
    # no need to specify 'TAB_NAME', it will be set to 'Subscriptions'
    # automatically
    pass

Note that TAB_NAME is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’

resources
class organizations(parent, logger=None, **kwargs)

Regular primary level Tab.

Usage:

@View.nested
class mytab(SatTab):
    TAB_NAME = 'My Tab'
@View.nested
class subscriptions(SatTab):
    # no need to specify 'TAB_NAME', it will be set to 'Subscriptions'
    # automatically
    pass

Note that TAB_NAME is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’

resources
breadcrumb
name
description
submit
provider
provider_content
property is_displayed

Overrides the Widget.is_displayed(). The difference is that if the view does not have the root locator, it assumes it is displayed.

Returns

bool

class airgun.views.computeresource.ResourceProviderEditView(parent, logger=None, **kwargs)

Base view for Satellite pages

property is_displayed

Overrides the Widget.is_displayed(). The difference is that if the view does not have the root locator, it assumes it is displayed.

Returns

bool

class airgun.views.computeresource.ResourceProviderDetailView(parent, logger=None, **kwargs)

Base view for Satellite pages

class compute_resource(parent, logger=None, **kwargs)

Regular primary level Tab.

Usage:

@View.nested
class mytab(SatTab):
    TAB_NAME = 'My Tab'
@View.nested
class subscriptions(SatTab):
    # no need to specify 'TAB_NAME', it will be set to 'Subscriptions'
    # automatically
    pass

Note that TAB_NAME is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’

TAB_NAME = Compute Resource
ROOT = .//div[@id='primary']
table
class virtual_machines(parent, logger=None, **kwargs)

Regular primary level Tab.

Usage:

@View.nested
class mytab(SatTab):
    TAB_NAME = 'My Tab'
@View.nested
class subscriptions(SatTab):
    # no need to specify 'TAB_NAME', it will be set to 'Subscriptions'
    # automatically
    pass

Note that TAB_NAME is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’

TAB_NAME = Virtual Machines
ROOT = .//div[@id='vms']
actions
table
class compute_profiles(parent, logger=None, **kwargs)

Regular primary level Tab.

Usage:

@View.nested
class mytab(SatTab):
    TAB_NAME = 'My Tab'
@View.nested
class subscriptions(SatTab):
    # no need to specify 'TAB_NAME', it will be set to 'Subscriptions'
    # automatically
    pass

Note that TAB_NAME is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’

TAB_NAME = Compute profiles
ROOT = .//div[@id='compute_profiles']
table
class images(parent, logger=None, **kwargs)

Regular primary level Tab.

Usage:

@View.nested
class mytab(SatTab):
    TAB_NAME = 'My Tab'
@View.nested
class subscriptions(SatTab):
    # no need to specify 'TAB_NAME', it will be set to 'Subscriptions'
    # automatically
    pass

Note that TAB_NAME is optional and if it’s absent - capitalized class name is used instead, which is useful for simple tab names like ‘Subscriptions’

TAB_NAME = Images
ROOT = .//div[@id='images']
filterbox
table
breadcrumb
submit
create_image
property is_displayed

Overrides the Widget.is_displayed(). The difference is that if the view does not have the root locator, it assumes it is displayed.

Returns

bool

class airgun.views.computeresource.ComputeResourceLibvirtProfileNetworkItem(parent, locator, logger=None)

Libvirt Compute Resource Profile “Network interface” item widget

network_type
network
nic_type
class airgun.views.computeresource.ComputeResourceLibvirtProfileStorageItem(parent, locator, logger=None)

Libvirt Compute Resource profile “Storage” item widget

storage_pool
size
storage_type
class airgun.views.computeresource.ComputeResourceRHVProfileNetworkItem(parent, locator, logger=None)

RHV Compute Resource profile “Network interface” item widget

name
network
interface_type
class airgun.views.computeresource.ComputeResourceRHVProfileStorageItem(parent, locator, logger=None)

RHV Compute Resource profile “Storage” item widget

class bootable(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

ROOT = .//input[contains(@id, 'bootable')]
_is_checked()
read()

Reads the contents of the view and presents them as a dictionary.

Returns

A dict of widget_name: widget_read_value where the values are retrieved using the Widget.read().

fill(value)

Implementation of form filling.

This method goes through all widgets defined on this view one by one and calls their fill methods appropriately.

None values will be ignored.

It will log any skipped fill items. It will log a warning if you pass any extra values for filling.

It will store the fill value in last_fill_data. The data will be “deflattened” to ensure uniformity.

Parameters

values – A dictionary of widget_name: value_to_fill.

Returns

bool if the fill changed any value.

size
storage_domain
preallocate_disk
wipe_disk_after_delete
disk_interface
class airgun.views.computeresource.ComputeResourceVMwareProfileNetworkItem(parent, locator, logger=None)

VMware Compute Resource Profile “Network interface” item widget

nic_type
network
class airgun.views.computeresource.ComputeResourceVMwareProfileControllerVolumeItem(parent, locator, logger=None)

VMware Compute Resource Profile “Storage Controller Volume” item widget

storage_pod
data_store
disk_mode
size
thin_provision
eager_zero
remove_button
class airgun.views.computeresource.ComputeResourceVMwareProfileControllerVolumeList(parent, logger=None, **kwargs)

VMware Compute Resource Profile SCSI Controller Volumes List

ROOT = .
ITEMS = .//div[@class='disk-container']
ITEM_WIDGET_CLASS
add_item_button
class airgun.views.computeresource.ComputeResourceVMwareProfileStorageItem(parent, locator, logger=None)

VMware Compute Resource Profile Storage Controller item widget

controller
remove_button
disks
class airgun.views.computeresource.ResourceProviderProfileView(parent, logger=None, **kwargs)

Base view for Satellite pages

class LibvirtResourceForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

class network_interfaces(parent, logger=None, **kwargs)

A host for widgets list. Items that can be added or removed, mainly used in profile for network interfaces, storage and job template.

Usage:

@View.nested
class resources(RemovableWidgetsItemsListView):
    ROOT = "//fieldset[@id='storage_volumes']"
    ITEMS = "./div/div[contains(@class, 'removable-item')]"
    ITEM_WIDGET_CLASS = ComputeResourceRHVProfileStorageItem
ROOT = //fieldset[@id='network_interfaces']
ITEM_WIDGET_CLASS
class storage(parent, logger=None, **kwargs)

A host for widgets list. Items that can be added or removed, mainly used in profile for network interfaces, storage and job template.

Usage:

@View.nested
class resources(RemovableWidgetsItemsListView):
    ROOT = "//fieldset[@id='storage_volumes']"
    ITEMS = "./div/div[contains(@class, 'removable-item')]"
    ITEM_WIDGET_CLASS = ComputeResourceRHVProfileStorageItem
ROOT = //fieldset[@id='storage_volumes']
ITEMS = ./div/div[contains(@class, 'removable-item')]
ITEM_WIDGET_CLASS
cpus
cpu_mode
memory
image
class EC2ResourceForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

flavor
image
availability_zone
subnet
security_groups
managed_ip
class GCEResourceForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

machine_type
image
network
external_ip
default_disk_size
class RHVResourceForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

class network_interfaces(parent, logger=None, **kwargs)

A host for widgets list. Items that can be added or removed, mainly used in profile for network interfaces, storage and job template.

Usage:

@View.nested
class resources(RemovableWidgetsItemsListView):
    ROOT = "//fieldset[@id='storage_volumes']"
    ITEMS = "./div/div[contains(@class, 'removable-item')]"
    ITEM_WIDGET_CLASS = ComputeResourceRHVProfileStorageItem
ROOT = //fieldset[@id='network_interfaces']
ITEM_WIDGET_CLASS
class storage(parent, logger=None, **kwargs)

A host for widgets list. Items that can be added or removed, mainly used in profile for network interfaces, storage and job template.

Usage:

@View.nested
class resources(RemovableWidgetsItemsListView):
    ROOT = "//fieldset[@id='storage_volumes']"
    ITEMS = "./div/div[contains(@class, 'removable-item')]"
    ITEM_WIDGET_CLASS = ComputeResourceRHVProfileStorageItem
ROOT = //fieldset[@id='storage_volumes']
ITEMS = ./div/div[contains(@class, 'removable-item')]
ITEM_WIDGET_CLASS
cluster
template
instance_type
cores
sockets
memory
highly_available
class VMwareResourceForm(parent, logger=None, **kwargs)

View is a kind of abstract widget that can hold another widgets. Remembers the order, so therefore it can function like a form with defined filling order.

It looks like this:

class Login(View):
    user = SomeInputWidget('user')
    password = SomeInputWidget('pass')
    login = SomeButtonWidget('Log In')

    def a_method(self):
        do_something()

The view is usually instantiated with an instance of widgetastic.browser.Browser, which will then enable resolving of all of the widgets defined.

Parameters
  • parent – A parent View or widgetastic.browser.Browser

  • additional_context – If the view needs some context, for example - you want to check that you are on the page of user XYZ but you can also be on the page for user FOO, then you shall use the additional_context to pass in required variables that will allow you to detect this.

class network_interfaces(parent, logger=None, **kwargs)

A host for widgets list. Items that can be added or removed, mainly used in profile for network interfaces, storage and job template.

Usage:

@View.nested
class resources(RemovableWidgetsItemsListView):
    ROOT = "//fieldset[@id='storage_volumes']"
    ITEMS = "./div/div[contains(@class, 'removable-item')]"
    ITEM_WIDGET_CLASS = ComputeResourceRHVProfileStorageItem
ROOT = //fieldset[@id='network_interfaces']
ITEM_WIDGET_CLASS
class storage(parent, logger=None, **kwargs)

A host for widgets list. Items that can be added or removed, mainly used in profile for network interfaces, storage and job template.

Usage:

@View.nested
class resources(RemovableWidgetsItemsListView):
    ROOT = "//fieldset[@id='storage_volumes']"
    ITEMS = "./div/div[contains(@class, 'removable-item')]"
    ITEM_WIDGET_CLASS = ComputeResourceRHVProfileStorageItem
ROOT = //div[contains(concat(' ', @class, ' '), ' vmware-storage-container ')]
ITEMS = //div[contains(concat(' ', @class, ' '), ' controller-container ')]
ITEM_WIDGET_CLASS
add_item_button
cpus
cores_per_socket
memory
firmware
cluster
resource_pool
folder
guest_os
virtual_hw_version
memory_hot_add
cpu_hot_add
cdrom_drive
annotation_notes
image
breadcrumb
compute_profile
compute_resource
provider_content
submit
property 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 EC2 provider, the compute resource name will be displayed as:

    “foo (ca-central-1-EC2)” where “ca-central-1” is the region.

property is_displayed

Overrides the Widget.is_displayed(). The difference is that if the view does not have the root locator, it assumes it is displayed.

Returns

bool

class airgun.views.computeresource.ResourceProviderVMImport(parent, logger=None, **kwargs)

Base view for Satellite pages

breadcrumb
property is_displayed

Overrides the Widget.is_displayed(). The difference is that if the view does not have the root locator, it assumes it is displayed.

Returns

bool

class airgun.views.computeresource.ComputeResourceGenericImageCreateView(parent, logger=None, **kwargs)

A Generic Compute Resource Image create view.

breadcrumb
name
operating_system
architecture
username
user_data
password
image
submit
property is_displayed

Overrides the Widget.is_displayed(). The difference is that if the view does not have the root locator, it assumes it is displayed.

Returns

bool

class airgun.views.computeresource.ComputeResourceGenericImageEditViewMixin

A Generic Mixin Resource Image edit view.

property is_displayed
class airgun.views.computeresource.ComputeResourceRHVImageCreateView(parent, logger=None, **kwargs)

RHV Compute resource Image create view.

class airgun.views.computeresource.ComputeResourceRHVImageEditView(parent, logger=None, **kwargs)

RHV Compute resource Image edit view.

class airgun.views.computeresource.ComputeResourceVMwareImageCreateView(parent, logger=None, **kwargs)

VMWare ComputeResource Image create View

class airgun.views.computeresource.ComputeResourceVMwareImageEditView(parent, logger=None, **kwargs)

VMWare ComputeResource Image edit View