Allow classes to be namespaced with subdirectories
Classes files may now reside in subdirectories, which act as namespaces.
For instance, a class ``ssh.server`` will result in the class definition
to be read from ``ssh/server.yml``. Specifying just ``ssh`` will cause
the class data to be read from ``ssh/init.yml`` or ``ssh.yml``. Note,
however, that only one of those two may be present.
Signed-off-by: martin f. krafft <madduck@madduck.net>
diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index a0ab3db..25bda17 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -5,6 +5,8 @@
========= ========== ========================================================
Version Date Changes
========= ========== ========================================================
+ * yaml_fs: classes may be defined in subdirectories
+ (closes: #12, #19, #20)
* Migrate Salt adapter to new core API (closes: #18)
* Fix --nodeinfo invocation in docs (closes: #21)
1.2.2 2013-12-27 * Recurse classes obtained from class mappings
diff --git a/doc/source/operations.rst b/doc/source/operations.rst
index 42e8a86..365c198 100644
--- a/doc/source/operations.rst
+++ b/doc/source/operations.rst
@@ -42,11 +42,17 @@
into which the node definition is supposed to be place.
============ ================================================================
-Nodes may be defined in subdirectories. However, node names (filename) must be
-unique across all subdirectories, and |reclass| will exit with an error if
-a node is defined multiple times. Subdirectories therefore really only exist
-for the administrator's local data structuring. They may be used in mappings
-(see below) to tag additional classes onto nodes.
+Classes files may reside in subdirectories, which act as namespaces. For
+instance, a class ``ssh.server`` will result in the class definition to be
+read from ``ssh/server.yml``. Specifying just ``ssh`` will cause the class
+data to be read from ``ssh/init.yml`` or ``ssh.yml``. Note, however, that only
+one of those two may be present.
+
+Nodes may also be defined in subdirectories. However, node names (filename)
+must be unique across all subdirectories, and |reclass| will exit with an
+error if a node is defined multiple times. Subdirectories therefore really
+only exist for the administrator's local data structuring. They may be used in
+mappings (see below) to tag additional classes onto nodes.
Data merging
------------
diff --git a/doc/source/todo.rst b/doc/source/todo.rst
index 38df768..18b39ed 100644
--- a/doc/source/todo.rst
+++ b/doc/source/todo.rst
@@ -57,12 +57,4 @@
Furthermore, ``$CWD`` and ``~`` might not make a lot of sense in all
use-cases.
-Class subdirectories
---------------------
-It would be nice syntactic sugar to allow classes to sit in subdirectories,
-such that ``ssh.server`` would load a class in …/ssh/server.yml (assuming
-``yaml_fs``).
-
-See `this pull request for a discussion about it <https://github.com/madduck/reclass/pull/12>`_.
-
.. include:: substs.inc