cfme.control.explorer.policies module

Page model for Control / Explorer

class cfme.control.explorer.policies.BasePolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

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

This class represents a Policy.

Example

>>> from cfme.control.explorer.policy import VMCompliancePolicy
>>> policy = VMCompliancePolicy("policy_description")
>>> policy.create()
>>> policy.delete()
Parameters:
  • description – Policy name.
  • active – Whether the policy active or not.
  • scope – Policy scope.
  • notes – Policy notes.
PRETTY = None
TREE_NODE = None
TYPE = None
assign_actions_to_event(event, actions)[source]

This method takes a list or dict of actions, goes into the policy event and assigns them. Actions can be passed both as the objects, but they can be passed also as a string. Actions, passed as an object but not created yet, will be created. If the specified event is not assigned to the policy, it will be assigned.

Parameters:
  • event – Name of the event under which the actions will be assigned.
  • actions – If list (or similar), all of these actions will be set under TRUE section. If dict, the action is key and value specifies its placement. If it’s True, then it will be put in the TRUE section and so on.
assign_conditions(*conditions)[source]

Assign conditions to this Policy.

Parameters:conditions – Conditions which need to be assigned.
assign_events(*events, **kwargs)[source]

Assign events to this Policy.

Parameters:
  • events – Events which need to be assigned.
  • extend – Do not uncheck existing events.
assigned_events
copy(cancel=False)[source]

Copy this Policy in UI.

Parameters:cancel – Whether to cancel the copying (default False).
create()[source]

Create this Policy in UI.

delete(cancel=False)[source]

Delete this Policy in UI.

Parameters:cancel – Whether to cancel the deletion (default False).
exists
is_condition_assigned(condition)[source]
is_event_assigned(event)[source]
update(updates)[source]

Update this Policy in UI.

Parameters:
  • updates – Provided by update() context manager.
  • cancel – Whether to cancel the update (default False).
class cfme.control.explorer.policies.ConditionDetailsView(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.policies.ContainerImageCompliancePolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Container Image'
TREE_NODE = 'Container Image'
TYPE = 'Compliance'
class cfme.control.explorer.policies.ContainerImageControlPolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Container Image'
TREE_NODE = 'Container Image'
TYPE = 'Control'
class cfme.control.explorer.policies.ContainerNodeCompliancePolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Node'
TREE_NODE = 'Container Node'
TYPE = 'Compliance'
class cfme.control.explorer.policies.ContainerNodeControlPolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Node'
TREE_NODE = 'Container Node'
TYPE = 'Control'
class cfme.control.explorer.policies.EditEventView(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.

false_actions

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

true_actions

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.policies.EditPolicyConditionAssignments(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.

conditions

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
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.policies.EditPolicyEventAssignments(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.

events

A class that implements the version picking functionality.

Basic usage is a descriptor in which you place instances of VersionPick in a view. Whenever is this instance accessed from an instance, it automatically picks the correct variant based on product_version defined in the widgetastic.browser.Browser.

You can also use this separately using the pick() method.

Example:

class MyView(View):
    something_version_dependent = VersionPick({
        '1.0.0': Foo('bar'),
        '2.5.0': Bar('baz'),
    })

This sample will resolve the correct (Foo or Bar) kind of item and returns it.

Parameters:version_dict – Dictionary of version_introduced: item
is_displayed
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.policies.EditPolicyView(parent, logger=None, **kwargs)[source]

Bases: cfme.control.explorer.policies.PolicyFormCommon

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.policies.EventDetailsView(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.policies.HostCompliancePolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Host / Node'
TREE_NODE = 'Host'
TYPE = 'Compliance'
class cfme.control.explorer.policies.HostControlPolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Host / Node'
TREE_NODE = 'Host'
TYPE = 'Control'
class cfme.control.explorer.policies.NewPolicyView(parent, logger=None, **kwargs)[source]

Bases: cfme.control.explorer.policies.PolicyFormCommon

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
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.policies.PodCompliancePolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Pod'
TREE_NODE = 'Pod'
TYPE = 'Compliance'
class cfme.control.explorer.policies.PodControlPolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Pod'
TREE_NODE = 'Pod'
TYPE = 'Control'
class cfme.control.explorer.policies.PoliciesAllView(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.policies.PolicyConditionDetails(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.policies.PolicyDetails(obj, navigate_obj)[source]

Bases: utils.appliance.implementations.ui.CFMENavigateStep

VIEW

alias of PolicyDetailsView

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.policies.PolicyDetailsView(parent, logger=None, **kwargs)[source]

Bases: cfme.control.explorer.ControlExplorerView

analysis_profile

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

type

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.policies.PolicyEdit(obj, navigate_obj)[source]

Bases: utils.appliance.implementations.ui.CFMENavigateStep

VIEW

alias of EditPolicyView

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.policies.PolicyEventDetails(obj, navigate_obj)[source]

Bases: utils.appliance.implementations.ui.CFMENavigateStep

VIEW

alias of EventDetailsView

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.policies.PolicyFormCommon(parent, logger=None, **kwargs)[source]

Bases: cfme.control.explorer.ControlExplorerView

active

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.

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.

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.

class cfme.control.explorer.policies.PolicyNew(obj, navigate_obj)[source]

Bases: utils.appliance.implementations.ui.CFMENavigateStep

VIEW

alias of NewPolicyView

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.policies.ReplicatorCompliancePolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Replicator'
TREE_NODE = 'Replicator'
TYPE = 'Compliance'
class cfme.control.explorer.policies.ReplicatorControlPolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Replicator'
TREE_NODE = 'Replicator'
TYPE = 'Control'
class cfme.control.explorer.policies.VMCompliancePolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'VM and Instance'
TREE_NODE = 'Vm'
TYPE = 'Compliance'
class cfme.control.explorer.policies.VMControlPolicy(description, active=True, scope=None, notes=None, appliance=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'VM and Instance'
TREE_NODE = 'Vm'
TYPE = 'Control'