JE-45252 [CS] Mixins: Include functionality: Globals/Action
Closed this issue · 2 comments
Mixins:JIRA task: JE-45252 [CS] Include functionality: Globals/Action
Добавляем параметр mixins в http://docs.cloudscripting.com/creating-manifest/basic-configs/#manifest-overview
addons: array
success: object/string
...: object
mixins: string array
…….
….
"..." - the list of events can be predefined before manifest is installed. More details
mixins [optional] - includes(mixes) the functionality and data from one manifest into another by URL or object. The following sections can be mixed:
globals
actions
addons
responses
The mixins section can contain a description of both a single and an array of mixins.
In case there are included the identical mixins or recursive ones, the only first occurrence will be taken into the action. Also, the names defined in the main manifest are of higher priority than those are in the mixins.
type: install
name: mixins test
globals:
layername: sqldb
mixins: https://raw.githubusercontent.com/vlobzakov/testscripts/master/mixin1.yaml
nodes:
- cloudlets: 8
nodeType: mysql - cloudlets: 8
nodeType: tomcat
onInstall:
- createlogfile
Where the Included mixin code looks as follows:
actions:
createlogfile:
cmd: touch /tmp/mixin.log
nodeGroup: ${globals.layername}
log: createlogfile
ok