Forum: CFEngine Help
Subject: Re: CFEngine Help: Bundle meta data
Author: eystein
Link to topic: https://cfengine.com/forum/read.php?3,25271,25282#msg-25282

Erik Mouw Wrote:
-------------------------------------------------------

> In my opinion it would be better to introduce an
> optional "metadata" promise type.
> In that way you wouldn't break existing
> installations. Something like:
> 
> metadata:
>       author  => "kermit";
>       email   => "ker...@muppetshow.example.com";
>       version => "42";
>       purpose => "Make sure Miss Piggy doesn't get
> angry";
>       comment => "Please don't let her read this!";

What about a small adjustment to make it adhere the CF3 syntax:

metadata:
        "author"         value => "kermit";
        "email"          value => "ker...@muppetshow.example.com";
        "version"  value => "42";
        "purpose"  value => "Make sure Miss Piggy doesn't get angry";
        "comment" value => "Please don't let her read this!";

This would make it look very much like vars:, but make it explicit that it is 
metadata, avoid naming clashes and make it possible to require certain fields 
(e.g. body agent control, require_metadata => { "author", "email" }). You can 
also add the other common promise attributes like comment and handle to 
describe each key,value further.

I would like to support slists here too, though, in case some meta-data is 
better expressed by those. Comments?

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to