cfme.web_ui.expression_editor module¶
The expression editor present in some locations of CFME.
-
class
cfme.web_ui.expression_editor.
Expression
(show_func=<function <lambda>>)[source]¶ Bases:
cfme.utils.pretty.Pretty
This class enables to embed the expression in a Form.
Parameters: show_func – Function to call to show the expression if there are more of them. -
pretty_attrs
= ['show_func']¶
-
-
cfme.web_ui.expression_editor.
fill_count
(count=None, key=None, value=None)[source]¶ Fills the ‘Count of’ type of form.
If the value is unspecified and we are in the advanced search form (user input), the user_input checkbox will be checked if the value is None.
Parameters: - count – Name of the field to compare (Host.VMs, ...).
- key – Operation to do (=, <, >=, ...).
- value – Value to check against.
Returns: See
cfme.web_ui.fill()
.
-
cfme.web_ui.expression_editor.
fill_field
(field=None, key=None, value=None)[source]¶ Fills the ‘Field’ type of form.
Parameters: - tag – Name of the field to compare (Host.VMs, ...).
- key – Operation to do (=, <, >=, IS NULL, ...).
- value – Value to check against.
Returns: See
cfme.web_ui.fill()
.
-
cfme.web_ui.expression_editor.
fill_find
(field=None, skey=None, value=None, check=None, cfield=None, ckey=None, cvalue=None)[source]¶
-
cfme.web_ui.expression_editor.
fill_registry
(key=None, value=None, operation=None, contents=None)[source]¶ Fills the ‘Registry’ type of form.
-
cfme.web_ui.expression_editor.
fill_tag
(tag=None, value=None)[source]¶ Fills the ‘Tag’ type of form.
Parameters: - tag – Name of the field to compare.
- value – Value to check against.
Returns: See
cfme.web_ui.fill()
.
-
cfme.web_ui.expression_editor.
get_expression_as_text
()[source]¶ Returns whole expression as represented visually.
-
cfme.web_ui.expression_editor.
get_func
(name)[source]¶ Return callable from this module by its name.
Parameters: name – Name of the variable containing the callable. Returns: Callable from this module
-
cfme.web_ui.expression_editor.
run_commands
(command_list, clear_expression=True)[source]¶ Run commands from the command list.
- Command list syntax:
[ "function1", # no args "function2", # dtto {"fill_fields": {"field1": "value", "field2": "value"}}, # Passes kwargs {"do_other_things": [1,2,3]} # Passes args ]
- In YAML:
- function1 - function2 - fill_fields: field1: value field2: value - do_other_things: - 1 - 2 - 3
Parameters: - command_list –
list
object of the commands - clear_expression – Whether to clear the expression before entering new one (default True)