cfme.configure.configuration.analysis_profile module¶
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfile
(name, description, profile_type, files=None, events=None, categories=None, registry=None, appliance=None)[source]¶ Bases:
cfme.utils.pretty.Pretty
,cfme.utils.update.Updateable
,widgetastic.utils.Fillable
,cfme.utils.appliance.Navigatable
Analysis profiles, Vm and Host type
Example: Note the keys for files, events, registry should match UI columns
p = AnalysisProfile(name, description, profile_type='VM') p.files = [ {"Name": "/some/anotherfile", "Collect Contents?": True}, ] p.events = [ {"Name": name, "Filter Message": msg, "Level": lvl, "Source": src, "# of Days": 1}, ] p.registry = [ {"Registry Key": key, "Registry Value": value}, ] p.categories = ["System", "Software"] # Use the checkbox text name p.create() p2 = p.copy(new_name="updated AP") with update(p): p.files = [{"Name": "/changed". "Collect Contents?": False}] p.delete()
-
CREATE_LOC
= None¶
-
HOST_TYPE
= 'Host'¶
-
VM_TYPE
= 'Vm'¶
-
exists
¶
-
form_fill_args
(updates=None)[source]¶ Build a dictionary of nested tab_forms for assoc_fill from a flat object dictionary If updates dictionary is passed, it is used instead of self This should work for create or update form fill args
-
pretty_attrs
= ('name', 'description', 'files', 'events')¶
-
update
(updates, cancel=False)[source]¶ Update the existing Analysis Profile with given updates dict Make use of Updateable and use with to update object as well Note the updates dict should take the structure below if called directly
updates = { 'name': self.name, 'description': self.description, 'files': { 'tab_form': ['/example/file']}, 'events': { 'tab_form': ['example_event']}, 'categories': { 'tab_form': ['Example']}, 'registry': { 'tab_form': ['example_registry']} }
- Args:
- updates (dict): Dictionary of values to change in the object. cancel (boolean): whether to cancel the update
-
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfileAdd
(obj, navigate_obj)[source]¶ Bases:
cfme.utils.appliance.implementations.ui.CFMENavigateStep
-
VIEW
¶ alias of
AnalysisProfileAddView
-
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.
-
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfileAddView
(*args, **kwargs)[source]¶ Bases:
cfme.base.login.BaseLoggedInPage
View for the add form, switches between host/vm based on object type Uses a switchable view based on the profile type widget
-
AnalysisProfileAddHost
= None¶
-
AnalysisProfileAddVm
= None¶
-
add
¶ 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
¶ 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.
-
form
¶ Conditional switchable view implementation.
This widget proxy is useful when you have a form whose parts displayed depend on certain conditions. Eg. when you select certain value from a dropdown, one form is displayed next, when other value is selected, a different form is displayed next. This widget proxy is designed to register those multiple views and then upon accessing decide which view to use based on the registration conditions.
The resulting widget proxy acts similarly like a nested view (if you use view of course).
Example
class SomeForm(View): foo = Input('...') action_type = Select(name='action_type') action_form = ConditionalSwitchableView(reference='action_type') # Simple value matching. If Action type 1 is selected in the select, use this view. # And if the action_type value does not get matched, use this view as default @action_form.register('Action type 1', default=True) class ActionType1Form(View): widget = Widget() # You can use a callable to declare the widget values to compare @action_form.register(lambda action_type: action_type == 'Action type 2') class ActionType2Form(View): widget = Widget() # With callable, you can use values from multiple widgets @action_form.register( lambda action_type, foo: action_type == 'Action type 2' and foo == 2) class ActionType2Form(View): widget = Widget()
You can see it gives you the flexibility of decision based on the values in the view.
Parameters: - reference – For using non-callable conditions, this must be specified. Specifies the name of
the widget whose value will be used for comparing non-callable conditions. Supports
going across objects using
.
. - ignore_bad_reference – If this is enabled, then when the widget representing the reference is not displayed or otherwise broken, it will then use the default view.
- reference – For using non-callable conditions, this must be specified. Specifies the name of
the widget whose value will be used for comparing non-callable conditions. Supports
going across objects using
-
is_displayed
¶
-
profile_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.
-
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.configure.configuration.analysis_profile.
AnalysisProfileAll
(obj, navigate_obj)[source]¶ Bases:
cfme.utils.appliance.implementations.ui.CFMENavigateStep
-
VIEW
¶ alias of
AnalysisProfileAllView
-
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.
-
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfileAllView
(*args, **kwargs)[source]¶ Bases:
cfme.base.login.BaseLoggedInPage
View for the Analysis Profile collection page
-
entities
¶ 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
¶
-
paginator
¶ 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.
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.
-
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfileBaseAddForm
(*args, **kwargs)[source]¶ Bases:
widgetastic.widget.View
View for the common elements of the two AP forms
-
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.
-
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.
-
files
¶ 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.
-
name
¶ 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.configure.configuration.analysis_profile.
AnalysisProfileCopy
(obj, navigate_obj)[source]¶ Bases:
cfme.utils.appliance.implementations.ui.CFMENavigateStep
-
VIEW
¶ alias of
AnalysisProfileCopyView
-
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.
-
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfileCopyView
(*args, **kwargs)[source]¶ Bases:
cfme.configure.configuration.analysis_profile.AnalysisProfileAddView
View for the copy form is the same as an add
The name field is by default set with ‘Copy of [profile name of copy source] Don’t want to assert against this field to separately verify the view is displayed If is_displayed is called after the form is changed it will be false negative
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfileDetails
(obj, navigate_obj)[source]¶ Bases:
cfme.utils.appliance.implementations.ui.CFMENavigateStep
-
VIEW
¶ alias of
AnalysisProfileDetailsView
-
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.
-
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfileDetailsEntities
(*args, **kwargs)[source]¶ Bases:
widgetastic.widget.View
Main content on an analysis profile details page
-
info_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.
-
info_name
¶ 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.
-
info_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.
-
table
¶ 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.configure.configuration.analysis_profile.
AnalysisProfileDetailsView
(*args, **kwargs)[source]¶ Bases:
cfme.base.login.BaseLoggedInPage
View for an analysis profile details page
-
entities
¶ 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
¶
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.
-
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfileEdit
(obj, navigate_obj)[source]¶ Bases:
cfme.utils.appliance.implementations.ui.CFMENavigateStep
-
VIEW
¶ alias of
AnalysisProfileEditView
-
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.
-
-
class
cfme.configure.configuration.analysis_profile.
AnalysisProfileEditView
(*args, **kwargs)[source]¶ Bases:
cfme.configure.configuration.analysis_profile.AnalysisProfileAddView
View for the edit form, extends add view since all fields are the same and editable
-
is_displayed
¶
-
reset
¶ 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
¶ 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.configure.configuration.analysis_profile.
AnalysisProfileEntities
(*args, **kwargs)[source]¶ Bases:
widgetastic.widget.View
Main content on the analysis profiles configuration page, title and table
-
table
¶ 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.configure.configuration.analysis_profile.
AnalysisProfileToolbar
(*args, **kwargs)[source]¶ Bases:
widgetastic.widget.View
Toolbar on the analysis profiles configuration page Works for both all page and 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.
-