yast2 |
modules/WorkflowManager.ycp |
Provides API for configuring workflows | |
|
|
This module has an unstable interface. |
Additional inst_finish settings defined by additional control files. They are always empty at the begining.
Returns list of additional inst_finish steps requested by additional workflows.
- Parameters:
-
which_steps
- Return value:
-
steps to be called ...see which_steps parameter
Stores the current ProductControl settings as the initial settings. These settings are: workflows, proposals, inst_finish, and clone_modules.
- Parameters:
-
force
Have system proposals already been prepared for merging?
Have system workflows already been prepared for merging?
Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals.
Input: [ $["label":"Example", "name":"example","proposal_modules":["one","two"],"stage":"initial,firstboot"] ] Output: [ $["label":"Example", "name":"example","proposal_modules":["one","two"],"stage":"initial"] $["label":"Example", "name":"example","proposal_modules":["one","two"],"stage":"firstboot"] ]
- Parameters:
-
proposals
- Return value:
-
updated proposals
Check all proposals, split those ones which have multiple modes or architectures or stages into multiple proposals. Works with base product proposals.
Check all workflows, split those ones which have multiple modes or architectures or stages into multiple workflows
- Parameters:
-
workflows
- Return value:
-
updated workflows
Check all workflows, split those ones which have multiple modes or architectures or stages into multiple worlflows. Works with base product workflows.
Fills the workflow with initial settings to start merging from scratch. Used workflows mustn't be cleared automatically, merging would fail!
Resets the Workflow (and proposals) to use the base workflow. It must be stored. Clears also all additional workflows.
Returns the current (default) directory where workflows are stored in.
Creates path to a control file from parameters. For add-on products, the 'ident' parameter is empty.
- Parameters:
-
src_id ident
- Return value:
-
path to a control file based on src_id and ident params
Stores the workflow file to a cache
- Parameters:
-
file_from file_to
- Return value:
-
final filename
Returns requested control filename. Parameter 'name' is ignored for Add-Ons.
- Parameters:
-
type `addon or `pattern src_id with Source ID name
- Return value:
-
path to already cached workflow file, control file is downloaded if not yet chached
Stores new workflow (if such workflow exists) into the Worflow Store.
- Parameters:
-
type src_id name with unique identification name of the object ("" for `addon, pattern name for `pattern)
- Return value:
-
whether successful (true also in case of no workflow file)
- Example
-
AddWorkflow (`addon, 4, "");
Removes workflow (if such workflow exists) from the Worflow Store. Alose removes the cached file but in the installation.
- Parameters:
-
type src_id name with unique identification name of the object
- Return value:
-
whether successful (true also in case of no workflow file)
- Example
-
RemoveWorkflow (`addon, 4, "");
Removes all xml and ycp files from directory where
Replace a module in a proposal with a set of other modules
- Parameters:
-
proposal a map describing the proposal old string the old item to be replaced new a list of items to be put into instead of the old one
- Return value:
-
a map with the updated proposal
Merge add-on proposal to a base proposal
- Parameters:
-
base additional_control with additional control file settings prod_name a name of the add-on product domain
- Return value:
-
merged proposals
Update system proposals according to proposal update metadata
- Parameters:
-
proposals a list of update proposals prod_name string the product name (used in case of tabs) domain string the text domain (for translations)
- Return value:
-
true on success
Replace a module in a workflow with a set of other modules
- Parameters:
-
workflow a map describing the workflow old string the old item to be replaced new a list of items to be put into instead of the old one domain string a text domain keep boolean true to keep original one (and just insert before)
- Return value:
-
a map with the updated workflow
Merge add-on workflow to a base workflow
- Parameters:
-
base map the base product workflow addon map the workflow of the addon product prod_name a name of the add-on product domain
- Return value:
-
merged workflows
Update system workflows according to workflow update metadata
- Parameters:
-
workflows a list of update workflows prod_name string the product name (used in case of tabs) domain string the text domain (for translations)
- Return value:
-
true on success
Add specified steps to inst_finish. Just modifies internal variables, inst_finish grabs them itself
- Parameters:
-
additional_steps a map specifying the steps to be added
- Return value:
-
true on success
Adapts the current workflow according to specified XML file content
- Parameters:
-
update_file a map containing the additional product control file name string the name of the additional product domain string the text domain for the additional control file
- Return value:
-
true on success
Add new defined proposal to the list of system proposals
- Parameters:
-
proposals a list of proposals to be added
- Return value:
-
true on success
Replace workflows for 2nd stage of installation
- Parameters:
-
workflows a list of the workflows
- Return value:
-
true on success
Returns list of workflows requiring registration
Returns whether a repository workflow requires registration
- Parameters:
-
src_id
- Return value:
-
if registration is required
Update product options such as global settings, software, partitioning or network.
- Parameters:
-
update_file a map containing update control file filename
- Return value:
-
true on success
Structure $[
"congratulate" : $[ "label" : "some text", ], "congratulate2" : $[ "label" : "some other text", "textdomain" : "control-2", // (optionally) ], ];
Redraws workflow steps. Function must be called when steps (or help for steps) are active. It doesn't work in case of active another dialog.
Integrate the changes in the workflow
- Parameters:
-
filename string filename of the control file (local filename)
- Return value:
-
true on success
Returns file unique identification in format ${file_MD5sum}-${file_size} Returns 'nil' if file doesn't exist, it is not a 'file', etc.
- Parameters:
-
workflow_filename
- Return value:
-
file_ident
Function uses the Base Workflow as the initial one and merges all added workflow into that workflow.
- Return value:
-
if successful
Returns whether some additional control files were added or removed from the last time MergeWorkflows() was called.
- Return value:
-
boolen see description
Returns list of control-file names currently used
- Return value:
-
files
Sets list of control-file names to be used. ATTENTION: this is dangerous and should be used in rare cases only!
- Parameters:
-
new_list
- Example
-
SetAllUsedControlFiles (["/tmp/new_addon_control.xml", "/root/special_addon.xml"]);
Returns whether some additional control files are currently in use.
- Return value:
-
some additional control files are in use.
Returns the current settings used by WorkflowManager. This function is just for debugging purpose.
Structure [
"workflows" : ... "proposals" : ... "inst_finish" : ... "clone_modules" : ... "unmerged_changes" : ... ];
- Return value:
-
of current settings