puppetlabs/classifier — pull request #34 by aperiodic (2014-03-03 19:18:18+00:00)
Title: (NC-143) Group hierarchy in storage.

Groups now have a "parent" key that names the group's parent. This key
must be set; groups are not allowed to exist outside of the hierarchy.
When the migrations are run, they insert a root group named "root" that
all others can descend from. This group is its own parent, and must be
the only group with this property.

Two new methods have been added to the Storage protocol:
`get-ancestors`, which returns the ancestors of a group starting with
its immediate parent and ending with the root group, and `get-subtree`
which returns the subtree of the group hierarchy rooted at the given
group. Each member of the hierarchy conforms to the HierarchyNode
schema, which ensures they each have a :group key and a :children key
that maps to a set of child HierarchyNodes.