inliniac/suricata — pull request #697 by jasonish (2013-12-09 18:19:33+00:00)
Title: Preview: YAML Anchors and Aliases.

I'm calling this a preview as I'm not sure if I want to keep the anchor's in the conf.c stuff, or keep it just as an attribute of YAML, but either way, the usage of aliases and anchors would not change.

Examples of what this allows:
```
parameter: ¶meter-anchor some-value
other-parameter: *some-value
```
is equivalent to:
```
parameter: some-value
other-parameter: some-value
```
Full mappings can be aliased:
```
mapping: &a-mapping-anchor
something: else
somewhere: here
things: [thing1, thing2]

parent:
child:
some-other-mapping: *a-mapping-anchor
```
evaluates to:
```
mapping: &a-mapping-anchor
something: else
somewhere: here
things: [thing1, thing2]

parent:
child:
some-other-mapping:
something: else
somewhere: here
things: [thing1, thing2]
```
A merge mapping allows you to copy in an existing mapping, and then add new or change items:
```
a-merged-mapping:
<<: *a-mapping-anchor
somewhere: there
someone: who
```
evaluates to:
```
a-merged-mapping:
something: else
somewhere: there
things: [thing1, thing2]
someone: who
```

https://buildbot.suricata-ids.org/builders/jasonish/builds/47
(the other buildbot never returned it seems)