Macro definitions should be parsed first
PyYaml seems to parse yaml files in an undefined order. Assume the following:
defs:
- !defmacro
name: test_one
params: {}
definition:
replaced1: ok
- !defmacro
name: test_two
params: {}
definition:
replaced2: ok
replaced3: ok
testnode: !multimacro
- name: test_one
- name: test_two
This is currently not possible, because !multimacro is executed before the defs-node. So the !defmacro statements come to late for the testnode to be affected.
This, however, would work:
defs:
- !defmacro
name: test_one
params: {}
definition:
replaced1: ok
- !defmacro
name: test_two
params: {}
definition:
replaced2: ok
replaced3: ok
testnode:
obl: !multimacro
- name: test_one
- name: test_two
How can we ensure that the node "defs" is parsed first?