cfme.automate.explorer module

class cfme.automate.explorer.Class(name=None, display_name=None, description=None, inherits_from=None, namespace=None, setup_schema=None)[source]

Bases: cfme.automate.explorer.CopiableTreeNode, utils.update.Updateable

Represents a Class in the CFME ui.

Providing a setup_schema dict, creates the Class with teh specified schema

class SchemaField(name=None, type_=None, data_type=None, default_value=None, display_name=None, description=None, sub=None, collect=None, message=None, on_entry=None, on_exit=None, on_error=None, max_retries=None, max_time=None)[source]

Bases: utils.update.Updateable

get_form(blank=False)[source]

Gets a form for a field that already exists (by its name). Or if blank=True, get the form for a new field. Must be on the correct page before calling this.

Class.create(cancel=False)[source]
Class.delete(cancel=False)[source]
Class.edit_schema(add_fields=None, remove_fields=None)[source]
Class.form = <cfme.web_ui.Form fields=[('name_text', <cfme.web_ui.Input _names=('name',), _use_id=False>), ('display_name_text', <cfme.web_ui.Input _names=('display_name',), _use_id=False>), ('description_text', <cfme.web_ui.Input _names=('description',), _use_id=False>), ('inherits_from_select', Select("//select[@name='inherits_from']", multi=False))]>
Class.name_in_table[source]

The item is displayed differently with display_name

Class.name_in_tree[source]

The item is displayed differently with display_name

Class.parent[source]
Class.path_str()[source]

Returns string path to this class, eg ns1/ns2/ThisClass

Class.schema_edit_page = <cfme.web_ui.Region title=None>
Class.update(updates, cancel=False)[source]
class cfme.automate.explorer.CopiableTreeNode[source]

Bases: cfme.automate.explorer.TreeNode

class_name[source]

Used for gathering the object name from the class name. If the name is not same, you can set it manually. This exploits the fact that the classes are named exactly as it appears in the UI, so it will work unless someone changes ui/class name. Then you can set it manually, as it contains setter.

copy_button = FormButton('Copy')
copy_form = <cfme.web_ui.Form fields=[('domain', Select('select#domain', multi=False)), ('domain_text_only', {Version ('lowest'): "//fieldset[p]//tr[./td[@class='key' and normalize-space(.)='To Domain']]/td[not(@class='key') and not(select)]", '5.5': "//label[contains(@class, 'control-label') and normalize-space(.)='To Domain']/../div/p"}), ('override', <cfme.web_ui.Input _names=('override_source',), _use_id=False>)]>
copy_to(domain=None)[source]
class cfme.automate.explorer.Domain(name=None, description=None, enabled=False)[source]

Bases: cfme.automate.explorer.TreeNode, utils.update.Updateable

create(cancel=False)[source]
delete(cancel=False)[source]
form = <cfme.web_ui.Form fields=[('name', <cfme.web_ui.Input _names=('ns_name',), _use_id=False>), ('description', <cfme.web_ui.Input _names=('ns_description',), _use_id=False>), ('enabled', <cfme.web_ui.Input _names=('ns_enabled',), _use_id=False>)]>
is_enabled[source]
is_locked[source]
navigate_tree()[source]
update(updates)[source]
class cfme.automate.explorer.Instance(name=None, display_name=None, description=None, values=None, cls=None)[source]

Bases: cfme.automate.explorer.CopiableTreeNode, utils.update.Updateable

Represents a Instance in the CFME ui.

create(cancel=False)[source]
delete(cancel=False)[source]
form = <cfme.web_ui.Form fields=[('name_text', "//input[contains(@name,'inst_name')]"), ('display_name_text', "//input[contains(@name,'inst_display_name')]"), ('description_text', "//input[contains(@name,'inst_description')]"), ('values', <cfme.automate.explorer.InstanceFields object at 0x7f4d27155210>)]>
name_in_table[source]

The item is displayed differently with display_name

name_in_tree[source]

The item is displayed differently with display_name

parent[source]
update(updates, cancel=False)[source]
class cfme.automate.explorer.InstanceFields[source]

Bases: object

Represents the table of fields defined for instance.

It uses web-scraping to determine what fields are available. It is maybe a slight slowdown, but no better solution with similar complexity (2 SLoC) exists.

Only real drawback is that you cannot use form when being somewhere else than on the page.

fields = {Version ('lowest'): "//div[@id='form_div']//table[@class='style3']//td[img]", '5.4': "//div[@id='form_div']//table[thead]//td[img]"}
form[source]

Returns Form filled with fields. Scraps the webpage to determine the fields.

Requires to be on the page

class cfme.automate.explorer.InstanceFieldsRow(row_id)[source]

Bases: utils.pretty.Pretty

Represents one row of instance fields.

Parameters:row_id – Sequential id of the row (begins with 0)
columns = ('value', 'on_entry', 'on_exit', 'on_error', 'collect')
fields = ('inst_value_{}', 'inst_on_entry_{}', 'inst_on_exit_{}', 'inst_on_error_{}', 'inst_collect_{}')
form[source]

Returns the form with fields targeted at our row_id.

Does not need to be on the page.

pretty_attrs = ['row_id']
table = <cfme.web_ui.Table _loc={Version ('lowest'): "//div[@id='form_div']//table[@class='style3']", '5.4': "//div[@id='form_div']//table[thead]"}>
class cfme.automate.explorer.Method(name=None, display_name=None, location=None, data=None, cls=None)[source]

Bases: cfme.automate.explorer.CopiableTreeNode, utils.update.Updateable

Represents a Method in the CFME ui. Display Name is not supported (it causes the name to be displayed differently in different places in the UI).

create(cancel=False)[source]
delete(cancel=False)[source]
form = <cfme.web_ui.Form fields=[('name_text', "//input[contains(@name,'method_name')]"), ('display_name_text', "//input[contains(@name,'method_display_name')]"), ('data_text', <cfme.web_ui.ScriptBox locator=None>)]>
parent[source]
update(updates, cancel=False)[source]
class cfme.automate.explorer.Namespace(name=None, description=None, parent=None, domain=None)[source]

Bases: cfme.automate.explorer.TreeNode, utils.update.Updateable

create(cancel=False)[source]
delete(cancel=False)[source]
form = <cfme.web_ui.Form fields=[('name', "//*[@id='ns_name']"), ('description', "//*[@id='ns_description']")]>
classmethod make_path(*names, **kwargs)[source]

Make a set of nested Namespace objects with the given path.

Usage:

#eg.
    n = Namespace.make_path("foo", "bar")
#is equivalent to:
    n = Namespace(name="bar", parent=Namespace(name="foo"))
update(updates, cancel=False)[source]
class cfme.automate.explorer.TreeNode[source]

Bases: utils.pretty.Pretty

exists()[source]
name_in_table[source]
name_in_tree[source]
nav_edit()[source]
nav_path[source]
navigate_tree()[source]
path[source]

Returns the path to this object as a list starting from the root

pretty_attrs = ['name']
cfme.automate.explorer.datastore_checkbox(name)[source]
cfme.automate.explorer.get_domain_order()[source]
cfme.automate.explorer.open_order_dialog_func(_)[source]
cfme.automate.explorer.set_domain_order(items)[source]
cfme.automate.explorer.table_select(name)[source]
cfme.automate.explorer.tree_item_not_found_is_leaf(e)[source]

Returns true if the given exception was while navigating a tree and the item in the path that was missing was the last item.