cfme.control.explorer.policies module

Page model for Control / Explorer

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

Bases: cfme.modeling.base.BaseEntity, cfme.utils.update.Updateable, cfme.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
__ge__(other)

Automatically created by attrs.

__gt__(other)

Automatically created by attrs.

__le__(other)

Automatically created by attrs.

__lt__(other)

Automatically created by attrs.

__ne__(other)

Check equality and either forward a NotImplemented or return the result negated.

__repr__()

Automatically created by attrs.

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. 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_actions_to_event(event)[source]
assigned_events
copy(cancel=False)[source]

Copy this Policy in UI.

Parameters:cancel – Whether to cancel the copying (default False).
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]
name_for_policy_profile
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(*args, **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(parent, description, active=None, scope=None, notes=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

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

Bases: cfme.control.explorer.policies.BasePolicy

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

Bases: cfme.control.explorer.policies.BasePolicy

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

Bases: cfme.control.explorer.policies.BasePolicy

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

supposed_title
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(*args, **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

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.

supposed_title
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(*args, **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.EventDetailsToolbar(*args, **kwargs)[source]

Bases: widgetastic.widget.View

Toolbar widgets on the event details page

configuration

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(*args, **kwargs)[source]

Bases: cfme.control.explorer.ControlExplorerView

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

toolbar

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

Bases: cfme.control.explorer.policies.BasePolicy

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

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Host / Node'
TREE_NODE = 'Host'
TYPE = 'Control'
class cfme.control.explorer.policies.NewPolicyView(*args, **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.PhysicalInfrastructureCompliancePolicy(parent, description, active=None, scope=None, notes=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Physical Server'
TREE_NODE = 'Physical Infrastructure'
TYPE = 'Compliance'
class cfme.control.explorer.policies.PhysicalInfrastructureControlPolicy(parent, description, active=None, scope=None, notes=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Physical Server'
TREE_NODE = 'Physical Infrastructure'
TYPE = 'Control'
class cfme.control.explorer.policies.PodCompliancePolicy(parent, description, active=None, scope=None, notes=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

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

Bases: cfme.control.explorer.policies.BasePolicy

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

Bases: cfme.utils.appliance.implementations.ui.CFMENavigateStep

VIEW

alias of PoliciesAllView

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.PolicyCollection(parent, filters=NOTHING)[source]

Bases: cfme.modeling.base.BaseCollection

CONTAINERIMAGE_CONTROL_POLICY

alias of ContainerImageControlPolicy

CONTAINERNODE_COMPLIANCE_POLICY

alias of ContainerNodeCompliancePolicy

CONTAINERNODE_CONTROL_POLICY

alias of ContainerNodeControlPolicy

ENTITY

alias of BasePolicy

HOST_COMPLIANCE_POLICY

alias of HostCompliancePolicy

HOST_CONTROL_POLICY

alias of HostControlPolicy

PHYSICAL_INFRASTRUCTURE_COMPLIANCE_POLICY

alias of PhysicalInfrastructureCompliancePolicy

PHYSICAL_INFRASTRUCTURE_CONTROL_POLICY

alias of PhysicalInfrastructureControlPolicy

POD_COMPLIANCE_POLICY

alias of PodCompliancePolicy

POD_CONTROL_POLICY

alias of PodControlPolicy

PROVIDER_COMPLIANCE_POLICY

alias of ProviderCompliancePolicy

PROVIDER_CONTROL_POLICY

alias of ProviderControlPolicy

REPLICATOR_COMPLIANCE_POLICY

alias of ReplicatorCompliancePolicy

REPLICATOR_CONTROL_POLICY

alias of ReplicatorControlPolicy

VM_COMPLIANCE_POLICY

alias of VMCompliancePolicy

VM_CONTROL_POLICY

alias of VMControlPolicy

__ge__(other)

Automatically created by attrs.

__gt__(other)

Automatically created by attrs.

__le__(other)

Automatically created by attrs.

__lt__(other)

Automatically created by attrs.

__ne__(other)

Check equality and either forward a NotImplemented or return the result negated.

__repr__()

Automatically created by attrs.

all()[source]
create(policy_class, description, active=True, scope=None, notes=None)[source]
delete(*policies)[source]
instantiate(policy_class, description, active=True, scope=None, notes=None)[source]
class cfme.control.explorer.policies.PolicyDetails(obj, navigate_obj)[source]

Bases: cfme.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(*args, **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: cfme.utils.appliance.implementations.ui.CFMENavigateStep

VIEW

alias of EditPolicyView

prerequisite

This is a helper descriptor for navigation destinations which are linked to the same class.

For instance, imagine you have an object that 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 NavigateToSibling as a helper. 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: cfme.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(*args, **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: cfme.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.ProviderCompliancePolicy(parent, description, active=None, scope=None, notes=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Provider'
TREE_NODE = 'Provider'
TYPE = 'Compliance'
class cfme.control.explorer.policies.ProviderControlPolicy(parent, description, active=None, scope=None, notes=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

PRETTY = 'Provider'
TREE_NODE = 'Provider'
TYPE = 'Control'
class cfme.control.explorer.policies.ReplicatorCompliancePolicy(parent, description, active=None, scope=None, notes=None)[source]

Bases: cfme.control.explorer.policies.BasePolicy

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

Bases: cfme.control.explorer.policies.BasePolicy

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

Bases: cfme.control.explorer.policies.BasePolicy

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

Bases: cfme.control.explorer.policies.BasePolicy

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