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-02 13:52:47 -0500
commitb75139eb492ca3485c4bc6328265f3e75e9624fe (patch)
tree20f3d7e5ef84b037a0e7fbe6cfe73dbaa14f034e
parentd7ce5d6926dffab8c167d41f4068d0f71c9beda7 (diff)
downloadbcfg2-b75139eb492ca3485c4bc6328265f3e75e9624fe.tar.gz
bcfg2-b75139eb492ca3485c4bc6328265f3e75e9624fe.tar.bz2
bcfg2-b75139eb492ca3485c4bc6328265f3e75e9624fe.zip
docs: Added more information for the metadata object used in TGenshi and TCheetah
-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 |
++------------------------------+------------------------------------------------+-------------------+
+