cfme.control.explorer.conditions module

class cfme.control.explorer.conditions.BaseCondition(description, expression=None, scope=None, notes=None, appliance=None)[source]

Bases: utils.update.Updateable, utils.appliance.Navigatable, utils.pretty.Pretty

FIELD_VALUE = None
PRETTY = None
TREE_NODE = None
create()[source]
delete(cancel=False)[source]

Delete this Condition in UI.

Parameters:cancel – Whether to cancel the deletion (default False).
exists

Check existence of this Condition.

Returns: bool signalizing the presence of the Condition in the database.

read_expression()[source]
read_scope()[source]
update(updates)[source]

Update this Condition in UI.

Parameters:
  • updates – Provided by update() context manager.
  • cancel – Whether to cancel the update (default False).
class cfme.control.explorer.conditions.ConditionDetails(obj, navigate_obj)[source]

Bases: utils.appliance.implementations.ui.CFMENavigateStep

VIEW

alias of ConditionDetailsView

prerequisite

This is a helper descriptor for destinations which are linked to an attribute of the object.

For instance, imagine you have an object that has an attribute(parent) which has a ‘ViewAll’, destination that needs to be visited before you can click on ‘New’. In this instance, you would need to make the ‘New’ destination use ‘ViewAll’ as a prerequisite. As this would need no other special input, we can use NavigateToAttribute as a helper, supplying only the name of the attribute which stores the object to be used in the navigation, and the destination name. This will set prerequisite to be a callable that will navigate to the prerequisite step.

step()[source]
class cfme.control.explorer.conditions.ConditionDetailsView(parent, logger=None, **kwargs)[source]

Bases: cfme.control.explorer.ControlExplorerView

expression

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

is_displayed
scope

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

title

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

class cfme.control.explorer.conditions.ConditionEdit(obj, navigate_obj)[source]

Bases: utils.appliance.implementations.ui.CFMENavigateStep

VIEW

alias of EditConditionView

prerequisite

This is a helper descriptor for destinations which are linked to an attribute of the object.

For instance, imagine you have an object that has an attribute(parent) which has a ‘ViewAll’, destination that needs to be visited before you can click on ‘New’. In this instance, you would need to make the ‘New’ destination use ‘ViewAll’ as a prerequisite. As this would need no other special input, we can use NavigateToAttribute as a helper, supplying only the name of the attribute which stores the object to be used in the navigation, and the destination name. This will set prerequisite to be a callable that will navigate to the prerequisite step.

step()[source]
class cfme.control.explorer.conditions.ConditionFormCommon(parent, logger=None, **kwargs)[source]

Bases: cfme.control.explorer.ControlExplorerView

cancel_button

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

description

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

expression

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

notes

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

scope

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

title

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

class cfme.control.explorer.conditions.ConditionNew(obj, navigate_obj)[source]

Bases: utils.appliance.implementations.ui.CFMENavigateStep

VIEW

alias of NewConditionView

prerequisite

This is a helper descriptor for destinations which are linked to an attribute of the object.

For instance, imagine you have an object that has an attribute(parent) which has a ‘ViewAll’, destination that needs to be visited before you can click on ‘New’. In this instance, you would need to make the ‘New’ destination use ‘ViewAll’ as a prerequisite. As this would need no other special input, we can use NavigateToAttribute as a helper, supplying only the name of the attribute which stores the object to be used in the navigation, and the destination name. This will set prerequisite to be a callable that will navigate to the prerequisite step.

step()[source]
class cfme.control.explorer.conditions.ConditionsAllView(parent, logger=None, **kwargs)[source]

Bases: cfme.control.explorer.ControlExplorerView

is_displayed
title

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

class cfme.control.explorer.conditions.ContainerImageCondition(description, expression=None, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.conditions.BaseCondition

FIELD_VALUE = 'Container Image'
PRETTY = 'Container Image'
TREE_NODE = 'Container Image'
class cfme.control.explorer.conditions.ContainerNodeCondition(description, expression=None, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.conditions.BaseCondition

FIELD_VALUE = 'Node'
PRETTY = 'Node'
TREE_NODE = 'Container Node'
class cfme.control.explorer.conditions.EditConditionView(parent, logger=None, **kwargs)[source]

Bases: cfme.control.explorer.conditions.ConditionFormCommon

is_displayed
reset_button

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

save_button

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

title

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

class cfme.control.explorer.conditions.Expression(parent, type_, logger=None)[source]

Bases: widgetastic.widget.Widget

ROOT = 'div#condition_info_div'
read(*args, **kwargs)[source]

In Condition details view Scope and Expression don’t have any locator. So we have to scrape whole text in the parent div and split it by “n”. After that in text_list we receive something like that:

[u'Scope',
 u'COUNT OF VM and Instance.Files > 150',
 u'Expression',
 u'VM and Instance : Boot Time BEFORE "03/04/2014 00:00"',
 u'Notes',
 u'No notes have been entered.',
 u'Assigned to Policies',
 u'This Condition is not assigned to any Policies.']

To get value of Scope or Expression firstly we find its index in the list and then just seek next member.

text_list
class cfme.control.explorer.conditions.HostCondition(description, expression=None, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.conditions.BaseCondition

FIELD_VALUE = 'Host / Node'
PRETTY = 'Host / Node'
TREE_NODE = 'Host'
class cfme.control.explorer.conditions.NewConditionView(parent, logger=None, **kwargs)[source]

Bases: cfme.control.explorer.conditions.ConditionFormCommon

add_button

This class handles instantiating and caching of the widgets on view.

It stores the class and the parameters it should be instantiated with. Once it is accessed from the instance of the class where it was defined on, it passes the instance to the widget class followed by args and then kwargs.

It also acts as a counter, so you can then order the widgets by their “creation” stamp.

is_displayed
class cfme.control.explorer.conditions.PodCondition(description, expression=None, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.conditions.BaseCondition

FIELD_VALUE = 'Pod'
PRETTY = 'Pod'
TREE_NODE = 'Pod'
class cfme.control.explorer.conditions.ProviderCondition(description, expression=None, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.conditions.BaseCondition

FIELD_VALUE = 'Provider'
PRETTY = 'Provider'
TREE_NODE = 'Provider'
class cfme.control.explorer.conditions.ReplicatorCondition(description, expression=None, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.conditions.BaseCondition

FIELD_VALUE = 'Replicator'
PRETTY = 'Replicator'
TREE_NODE = 'Replicator'
class cfme.control.explorer.conditions.VMCondition(description, expression=None, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.conditions.BaseCondition

FIELD_VALUE = 'VM and Instance'
PRETTY = 'VM'
TREE_NODE = 'VM and Instance'