[Flow] Reuse of YAML settings

Peter Russ peter.russ at 4many.net
Fri Apr 18 17:53:21 CEST 2014


--- Original Nachricht ---
Absender:   Adrian Föder
Datum:       17.04.2014 09:21:
> Hi Peter,
>
> interesting, didn't know that works.
> Anyway, I am not aware of a way including it from other files; and TBH I
> think it's good how it is: you will get pretty soon in a huge mess since
> the configuration merging is so enourmous.
>
> Just 2 cents...
>
> Adrian
>
> Am 08.04.2014 09:28, schrieb Peter Russ:
>> What is the recommended way to "include" YAML settings?
>>
>> As long as it is within one YAML-File the merge operator is a handy way
>> to reduce the configuration overhead.
>> Example:
>>      ACME:
>>        predfine1: &value1
>>          value1: test
>>
>>      ACME1:
>>        values:
>>          <<: *value1
>>
>> Is there a solution within FLOW to include this settings from other
>> files?
>>
>> Hints welcome.

Hallo Adrian,

thanks for your reply.
You're right that it would be a nightmare and mess including files 
through several instances.
But it would be pretty handy to overide or extend if you use only one level.
Example:
ACME/Common.Client/Configuration/Settings.yaml
ACME:
   CommonClient1: &cc1
     SecondDb:
       host: 123.45.67.89
       port: 25637
       db: common
   CommonClient2: &cc2
     SecondDb:
       host: 123.45.67.90
       port: 25638
       db: common
...

ACME/Client.A/Configuration/Settings.yaml
ACME:
   ClientA:
     <<: *cc1
     SecondDb:
       db: client_a
ACME/Client.B/Configuration/Settings.yaml
ACME:
   ClientB:
     <<: *cc2
     SecondDb:
       db: client_b

Peter



-- 
Fiat lux! Docendo discimus.
_____________________________

http://www.xing.com/profile/Peter_Russ



More information about the Flow mailing list