summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2010-11-02 13:52:19 -0500
committerTim Laszlo <tim.laszlo@gmail.com>2010-11-04 06:11:18 -0500
commit7395ce1165f52cb5f6a3033f6eb6b87687b8b2d9 (patch)
treedd0dd0578b7e7dee4f0240a30c1565065a881c84
parentba3de50daec47f9caf21b46017423ffc99955cb8 (diff)
downloadbcfg2-7395ce1165f52cb5f6a3033f6eb6b87687b8b2d9.tar.gz
bcfg2-7395ce1165f52cb5f6a3033f6eb6b87687b8b2d9.tar.bz2
bcfg2-7395ce1165f52cb5f6a3033f6eb6b87687b8b2d9.zip
docs: Added more information for the metadata object used in TGenshi and TCheetah
(cherry picked from commit dd0168f42a2efddecec09c51313899ea7b3b39ec)
-rw-r--r--doc/server/plugins/generators/tcheetah.txt16
-rw-r--r--doc/server/plugins/generators/tgenshi/index.txt6
-rw-r--r--doc/server/plugins/grouping/metadata.txt67
3 files changed, 73 insertions, 16 deletions
diff --git a/doc/server/plugins/generators/tcheetah.txt b/doc/server/plugins/generators/tcheetah.txt
index e1ad600a2..52a0f3264 100644
--- a/doc/server/plugins/generators/tcheetah.txt
+++ b/doc/server/plugins/generators/tcheetah.txt
@@ -27,7 +27,7 @@ located in in a ``TCheetah`` subdirectory of your repository, usually
files, ``template`` and ``info``. The template is a standard Cheetah
template with two additions:
-* `self.metadata` is the client's metadata
+* `self.metadata` is the client's :ref:`metadata <server-plugins-grouping-metadata-clientmetadata>`
* `self.properties` is an xml document of unstructured data
The ``info`` file is formatted like ``:info`` files from Cfg.
@@ -44,19 +44,7 @@ Permissions entry and a Path entry to handle the same file.
self.metadata variables
=======================
-The following variables are available for self.metadata:
-
-* hostname
-* bundles
-* groups
-* categories
-* probes
-* uuid
-* password
-
-self.metadata is an instance of the class
-ClientMetadata of file `Bcfg2/Server/Plugins/Metadata.py
-<http://trac.mcs.anl.gov/projects/bcfg2/browser/trunk/bcfg2/src/lib/Server/Plugins/Metadata.py>`_.
+self.metadata is an instance of the class ClientMetadata and documented :ref:`here <server-plugins-grouping-metadata-clientmetadata>`.
self.properties
===============
diff --git a/doc/server/plugins/generators/tgenshi/index.txt b/doc/server/plugins/generators/tgenshi/index.txt
index cd9bcf152..425b3a289 100644
--- a/doc/server/plugins/generators/tgenshi/index.txt
+++ b/doc/server/plugins/generators/tgenshi/index.txt
@@ -48,8 +48,10 @@ supported.
Inside of templates
===================
-* metadata is the client's metadata
-* properties.properties is an xml document of unstructured data
+* **metadata** is the client's :ref:`metadata <server-plugins-grouping-metadata-clientmetadata>`
+* **properties.properties** is an xml document of unstructured data
+* **name** is the path name specified in bcfg
+* **path** is the path to the TGenshi template
See the genshi `documentation
<http://genshi.edgewall.org/wiki/Documentation>`_ for examples of
diff --git a/doc/server/plugins/grouping/metadata.txt b/doc/server/plugins/grouping/metadata.txt
index 96fc70ff5..22c967262 100644
--- a/doc/server/plugins/grouping/metadata.txt
+++ b/doc/server/plugins/grouping/metadata.txt
@@ -225,3 +225,70 @@ Probes
The metadata plugin includes client-side probing functionality. This
is fully documented :ref:`here <server-plugins-probes-index>`.
+
+.. _server-plugins-grouping-metadata-clientmetadata:
+
+ClientMetadata
+==============
+
+A special client metadata class is available to the TGenshi and TCheetah
+plugins.
+
++----------------------+------------------------------------------------+-------------------+
+| Attribute | Description | Value |
++======================+================================================+===================+
+| hostname | Client hostname | String |
++----------------------+------------------------------------------------+-------------------+
+| profile | Client profile | String |
++----------------------+------------------------------------------------+-------------------+
+| aliases | Client aliases | List |
++----------------------+------------------------------------------------+-------------------+
+| addresses | Adresses this client is known by | List |
++----------------------+------------------------------------------------+-------------------+
+| groups | Groups this client is a member of | List |
++----------------------+------------------------------------------------+-------------------+
+| categories | Categories of this clients groups | List |
++----------------------+------------------------------------------------+-------------------+
+| uuid | uuid identifier for this client | String |
++----------------------+------------------------------------------------+-------------------+
+| password | bcfg password for this client | String |
++----------------------+------------------------------------------------+-------------------+
+| connectors | connector plugins known to this client | List |
++----------------------+------------------------------------------------+-------------------+
+| query | MetadataQuery object | MetadataQuery |
++----------------------+------------------------------------------------+-------------------+
+
+|
+
++------------------------------+------------------------------------------------+-------------------+
+| Method | Description | Value |
++==============================+================================================+===================+
+| inGroup(group) | True if this client is a memnber of 'group' | Boolean |
++------------------------------+------------------------------------------------+-------------------+
+| group_in_category(category) | Returns the group in 'category' if the client | String |
+| | is a member of 'category', otherwise '' | |
++------------------------------+------------------------------------------------+-------------------+
+
+MetadataQuery
+-------------
+
+This class provides query routines for the servers Metadata.
+
++------------------------------+------------------------------------------------+-------------------+
+| Method | Description | Value |
++==============================+================================================+===================+
+| by_name(client) | Get ClientMetadata object for 'client' | ClientMetadata |
++------------------------------+------------------------------------------------+-------------------+
+| names_by_groups(group) | | |
++------------------------------+------------------------------------------------+-------------------+
+| names_by_profiles(profile) | All clients names in 'profile' | List |
++------------------------------+------------------------------------------------+-------------------+
+| all_clients() | All known client hostnames | List |
++------------------------------+------------------------------------------------+-------------------+
+| all_groups() | All known group names | List |
++------------------------------+------------------------------------------------+-------------------+
+| all_groups_in_category(cat) | All groups in category 'cat' | List |
++------------------------------+------------------------------------------------+-------------------+
+| all() | Get ClientMetadata for all clients | List |
++------------------------------+------------------------------------------------+-------------------+
+