teemtee / fmf

Flexible Metadata Format
GNU General Public License v2.0
22 stars 28 forks source link

RFE: Support for merging phase metadata when multiple phases are used #198

Open KwisatzHaderach opened 1 year ago

KwisatzHaderach commented 1 year ago

When defining multiple phases for a step there is no way to append specific phase. In my opinion this could be possible at least for named phases, e.g. like:

main.fmf:

report:
  - how: html
  - how: polarion
    name: polarion-report
    upload: False

nested.fmf

report+:
  - name+: polarion-report
    title: some useful title
psss commented 1 year ago

As fmf does not know anything about name being a special key, it would be probably needed to introduce some general way how to identify a matching list item. Perhaps a dedicated suffix could help here?

report+:
  - name=: polarion-report
    title: some useful title

This would give also some more flexibility for choosing step phases to be modified:

provision:
  - name: client-one
    role: client
    hardware:
        arch: x86_64
        memory: 1024
  - name: client-two
    role: client
    hardware:
        arch: x86_64
        memory: 1024
  - name: server-one
    role: server
    hardware:
        arch: x86_64
        memory: 2048

provision+:
  - role=: client
    hardware+:
        memory: 2048

Or, perhaps, even combining several key values:

provision+:
  - how=: virtual
    arch=: s390x
    memory+: 4096