Revamp storage classes, add node subdirs and caching
This is a mammoth commit, sorry about that. In trying to add node subdir
support, I ended up refactoring a lot of the logic from yaml_fs into the
storage base class, and then caching was added along the way, I almost
didn't notice. ;)
Signed-off-by: martin f. krafft <madduck@madduck.net>
diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index 3553051..1bd522a 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -5,6 +5,10 @@
========= ========== ========================================================
Version Date Changes
========= ========== ========================================================
+ * Caching of classes for performance reasons, especially
+ during the inventory runs
+ * yaml_fs: nodes may be defined in subdirectories
+ (closes: #10).
* Classes and nodes URI must not overlap anymore
* Class names must not contain spaces
1.1 2013-08-28 Salt adapter: fix interface to include minion_id, filter
diff --git a/doc/source/operations.rst b/doc/source/operations.rst
index 049fed1..671b8b0 100644
--- a/doc/source/operations.rst
+++ b/doc/source/operations.rst
@@ -40,6 +40,12 @@
permit_root_login: no
============ ================================================================
+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 sanity (and may be used in the future to tag
+additional classes onto nodes).
+
Data merging
------------
|reclass| has two modes of operation: node information retrieval and inventory
diff --git a/doc/source/todo.rst b/doc/source/todo.rst
index f1733c5..5aa12c7 100644
--- a/doc/source/todo.rst
+++ b/doc/source/todo.rst
@@ -74,9 +74,4 @@
a list of clients that define it as their master. That would short-circuit
Puppet's ``storeconfigs`` and Salt's ``mine``.
-Caching of classes in yaml\_fs
-------------------------------
-Right now, ``yaml\_fs`` opens each class file dozens of times during an
-inventory run. A class could be cached.
-
.. include:: substs.inc