madduck/reclass — pull request #9 by octo47 (2013-11-25 21:13:05+00:00)
Title: node groups support implemented

Idea of this patch is to create special file, which denotes group of nodes, and by design,
declass assumes, that .yml file with the same name exists. thats gives us several
identical nodes, which names are listed in .grp file

example: (also example available in examples directory)

we can create file group1.grp and group1.yml, thats gives us effect of several identical .yml
files with the same content as group1.yml.

as for performance, seems that it works reasonably fast, event for 4k hosts.

additionally, this patch fixes bug with inner directories. If we create node definition in
inner directory we got error, like this:
```
├── classes
│ ├── basenode.yml
│ ├── mysite.yml
│ └── unixnode.yml
├── nodes
│ ├── localhost.yml
│ └── m1
│ └── ttt.yml
```

$ ./reclass.py -b examples -n ttt
No such file: /Users/octo/Projects/github/reclass/examples/nodes/ttt.yml
$ ./reclass.py -b examples -i
No such file: /Users/octo/Projects/github/reclass/examples/nodes/ttt.yml