(hope this is not showing up multiple times, I’ve been having mail problems, 
have now subscribed from a different account….).

I think some kind of flattening is a good idea as otherwise you have 
coordination problems between multiple configs.

Felix ds actually supports consuming flattening based on complex keys rather 
than complex values, mapping to nested config annotation/interfaces. (turn on 
config-with-interfaces) (I should have a felix annotation to add felix custom 
options to generated comonent xml available soon, especially if you lean on me 
a bit).

There’s also discussion of a conversion spec in OSGI which may be relevant.  
EnRoute already has some quite sophisticated conversions.

thanks
david jencks
> On Nov 18, 2015, at 1:12 PM, Benson Margulies <ben...@basistech.com> wrote:
> 
> I realize that I forgot to supply the motivation for this question.
> 
> So long as the configuration is read-only (set up at
> karaf-assembly-build time), then there's really nothing objectionable
> about .cfg -> .yaml. I've started to think  about the possibility of
> allowing for people to push changed configuration into the running
> system. I could arrange this as 'new yaml file, tell config-admin new
> prop value' and that would work, but I found myself wondering if
> anyone had a scheme other than that or flattening.
> 
> 
> On Wed, Nov 18, 2015 at 12:54 PM, Pavel E. Shirshov <pshirs...@gmail.com> 
> wrote:
>> Any complex structure may be flattened.
>> 
>> Example for HOCON: https://gist.github.com/FeiWongReed/44799f4461c43f8e83c2
>> 
>> On 18/11/15 17:44, Benson Margulies wrote:
>>> On Wed, Nov 18, 2015 at 12:39 PM, Jean-Baptiste Onofré <j...@nanthrax.net> 
>>> wrote:
>>>> Hi Benson,
>>>> 
>>>> It's something that we do in Decanter (with elasticsearch.yaml, but it's
>>>> just a load), or in Cellar (with Hazelcast XML parsing), or in Pax Web 
>>>> (when
>>>> refering the jetty.xml).
>>>> 
>>>> What do you mean exactly ? You want to load the yaml configuration in
>>>> ConfigAdmin ? In that case, it's possible in an adapter.
>>>> 
>>>> Please, can you elaborate a bit ?
>>> Here's what I do now, which might be the same as you:
>>> 
>>>    foo.cfg
>>>      workerConfig=${karaf.etc}/worker-config.yaml
>>> 
>>> Here's what I was wondering about: could I arrange for foo.'cfg' to
>>> actually be a YAML file, and use Jackson to parse it so that the
>>> <String, Object> dictionaries would contain interesting objects.
>>> 
>>> Can you point me at more reading about 'adapters'? That sounds like
>>> the line I would want to follow.
>>> 
>>> 
>>> 
>>> 
>>>> Thanks,
>>>> Regards
>>>> JB
>>>> 
>>>> 
>>>> On 11/18/2015 06:36 PM, Benson Margulies wrote:
>>>>> I've got some cases where I made a .cfg file point to a .yaml file
>>>>> because I had a complex configuration. The API to config admin sort of
>>>>> suggests that it might be possible to have more complex data
>>>>> structures so long as the top-level is key-value; is this actually
>>>>> doable, and, if so, how?
>>>>> 
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbono...@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>> 
>> 

Reply via email to