airgun.entities.computeresource

Module Contents

Classes

ComputeResourceEntity

ShowAllComputeResources

AirGun's version of navmazing.NavigateStep with custom

AddNewComputeResource

AirGun's version of navmazing.NavigateStep with custom

EditExistingComputeResource

AirGun's version of navmazing.NavigateStep with custom

ComputeResourceDetail

AirGun's version of navmazing.NavigateStep with custom

ComputeResourceProfileDetail

AirGun's version of navmazing.NavigateStep with custom

ComputeResourceVMImport

AirGun's version of navmazing.NavigateStep with custom

ComputeResourceImageProvider

Base class for image create and edit views, that need to dynamically define the view type

ComputeResourceImageCreate

Base class for image create and edit views, that need to dynamically define the view type

ComputeResourceImageEdit

Base class for image create and edit views, that need to dynamically define the view type

class airgun.entities.computeresource.ComputeResourceEntity(browser)
endpoint_path = /compute_resources
create(values)

Create new compute resource entity

search(value)

Search for compute resource entity and return table row that contains that entity

edit(name, values)

Edit specific compute resource values

read(entity_name, widget_names=None)

Read all values for existing compute resource entity

delete(value)

Delete specific compute profile

list_vms(entity_name, expected_vm_name=None)

Returns all the VMs on the CR or VM with specified name

search_virtual_machine(entity_name, value)

Search for compute resource virtual machine.

Parameters
  • entity_name (str) – The compute resource name.

  • value (str) – The value to put in virtual machine tab search box.

Returns

The Compute resource virtual machines table rows values.

vm_status(entity_name, vm_name)

Returns True if the machine is running, False otherwise

vm_poweron(entity_name, vm_name)

Starts the specified VM

vm_poweroff(entity_name, vm_name)

Stops the specified VM

vm_import(entity_name, vm_name, hostgroup, location)

Imports the specified VM

update_computeprofile(entity_name, compute_profile, values)

Update specific compute profile attributes through CR detail view

read_computeprofile(entity_name, compute_profile, widget_names=None)

Read specific compute profile attributes through CR detail view

create_image(entity_name, values)

Create a compute resource image.

Parameters
  • entity_name (str) – The compute resource name

  • values (dict) – The image properties

search_images(entity_name, value)

Search for compute resource images.

Parameters
  • entity_name (str) – The compute resource name.

  • value (str) – The value to put in images tab search box.

Returns

The Compute resource images table rows values.

read_image(entity_name, image_name, widget_names=None)

Read from compute resource image edit view.

Parameters
  • entity_name (str) – The compute resource name.

  • image_name (str) – The existing compute resource image name to read.

Returns

The edit view widgets values

update_image(entity_name, image_name, values)

Update compute resource image properties.

Parameters
  • entity_name (str) – The compute resource name.

  • image_name (str) – The existing compute resource image name to update

  • values (dict) – The image new properties.

delete_image(entity_name, image_name)

Delete compute resource image.

Parameters
  • entity_name (str) – The compute resource name.

  • image_name (str) – The existing compute resource image name to delete.

class airgun.entities.computeresource.ShowAllComputeResources(obj, navigate_obj, logger=None)

AirGun’s version of navmazing.NavigateStep with custom implementations of navmazing.NavigateStep.am_i_here and navmazing.NavigateStep.go and ability to work with views.

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.computeresource.AddNewComputeResource(obj, navigate_obj, logger=None)

AirGun’s version of navmazing.NavigateStep with custom implementations of navmazing.NavigateStep.am_i_here and navmazing.NavigateStep.go and ability to work with views.

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.computeresource.EditExistingComputeResource(obj, navigate_obj, logger=None)

AirGun’s version of navmazing.NavigateStep with custom implementations of navmazing.NavigateStep.am_i_here and navmazing.NavigateStep.go and ability to work with views.

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.

post_navigate(_tries, *args, **kwargs)

Select Compute resource tab for initialization

am_i_here(*args, **kwargs)

Describes if the navigation is already at the requested destination.

By default, airgun relies on view’s is_displayed property to determine whether navigation succeeded. If positional argument entity_name was passed and view has BreadCrumb widget, it will also ensure second location in breadcrumb is provided entity name.

This method may be overridden on specific entity’s NavigateStep level for more complex logic if needed.

Returns

whether navigator is at requested destination or not.

Return type

bool

class airgun.entities.computeresource.ComputeResourceDetail(obj, navigate_obj, logger=None)

AirGun’s version of navmazing.NavigateStep with custom implementations of navmazing.NavigateStep.am_i_here and navmazing.NavigateStep.go and ability to work with views.

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.

am_i_here(*args, **kwargs)

Describes if the navigation is already at the requested destination.

By default, airgun relies on view’s is_displayed property to determine whether navigation succeeded. If positional argument entity_name was passed and view has BreadCrumb widget, it will also ensure second location in breadcrumb is provided entity name.

This method may be overridden on specific entity’s NavigateStep level for more complex logic if needed.

Returns

whether navigator is at requested destination or not.

Return type

bool

class airgun.entities.computeresource.ComputeResourceProfileDetail(obj, navigate_obj, logger=None)

AirGun’s version of navmazing.NavigateStep with custom implementations of navmazing.NavigateStep.am_i_here and navmazing.NavigateStep.go and ability to work with views.

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.computeresource.ComputeResourceVMImport(obj, navigate_obj, logger=None)

AirGun’s version of navmazing.NavigateStep with custom implementations of navmazing.NavigateStep.am_i_here and navmazing.NavigateStep.go and ability to work with views.

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.computeresource.ComputeResourceImageProvider(obj, navigate_obj, logger=None)

Base class for image create and edit views, that need to dynamically define the view type (that depend from compute resource provider) before reaching navigation destination.

PROVIDER_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.

am_i_here(*args, **kwargs)

Describes if the navigation is already at the requested destination.

By default, airgun relies on view’s is_displayed property to determine whether navigation succeeded. If positional argument entity_name was passed and view has BreadCrumb widget, it will also ensure second location in breadcrumb is provided entity name.

This method may be overridden on specific entity’s NavigateStep level for more complex logic if needed.

Returns

whether navigator is at requested destination or not.

Return type

bool

class airgun.entities.computeresource.ComputeResourceImageCreate(obj, navigate_obj, logger=None)

Base class for image create and edit views, that need to dynamically define the view type (that depend from compute resource provider) before reaching navigation destination.

PROVIDER_VIEWS
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.computeresource.ComputeResourceImageEdit(obj, navigate_obj, logger=None)

Base class for image create and edit views, that need to dynamically define the view type (that depend from compute resource provider) before reaching navigation destination.

PROVIDER_VIEWS
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.