summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/server/plugins/generators/tcheetah.txt18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/server/plugins/generators/tcheetah.txt b/doc/server/plugins/generators/tcheetah.txt
index 185b25ef5..5819bba96 100644
--- a/doc/server/plugins/generators/tcheetah.txt
+++ b/doc/server/plugins/generators/tcheetah.txt
@@ -28,7 +28,7 @@ files, ``template`` and ``info``. The template is a standard Cheetah
template with two additions:
* `self.metadata` is the client's :ref:`metadata <server-plugins-grouping-metadata-clientmetadata>`
-* `self.properties` is an xml document of unstructured data
+* `self.metadata.Properties` is an xml document of unstructured data
The ``info`` file is formatted like ``:info`` files from Cfg.
@@ -47,8 +47,8 @@ self.metadata variables
self.metadata is an instance of the class ClientMetadata and documented
:ref:`here <server-plugins-grouping-metadata-clientmetadata>`.
-self.properties
-===============
+self.metadata.Properties
+========================
Properties is a python `ElementTree <http://codespeak.net/lxml/>`_
object, loaded from the data in ``/var/lib/bcfg2/Properties/<properties
@@ -70,13 +70,13 @@ You may use any of the ElementTree methods to access data in your
template. Several examples follow, each producing an identical result
on the host 'www.example.com'::
- $self.Properties['example.xml'].find('host').find('www.example.com').find('rootdev').text
- $self.Properties['example.xml'].find('host').find($self.metadata.hostname).find('rootdev').text
- ${self.Properties['example.xml'].xpath('host/www.example.com/rootdev')[0].text}
- ${self.Properties['example.xml'].xpath('host/' + self.metadata.hostname + '/rootdev')[0].text}
+ $self.metadata.Properties['example.xml'].data.find('host').find('www.example.com').find('rootdev').text
+ $self.metadata.Properties['example.xml'].data.find('host').find($self.metadata.hostname).find('rootdev').text
+ ${self.metadata.Properties['example.xml'].data.xpath('host/www.example.com/rootdev')[0].text}
+ ${self.metadata.Properties['example.xml'].data.xpath('host/' + self.metadata.hostname + '/rootdev')[0].text}
#set $path = 'host/' + $self.metadata.hostname + '/rootdev'
- ${self.Properties['example.xml'].xpath($path)[0].text}
- ${self.Properties['example.xml'].xpath(path)[0].text}
+ ${self.metadata.Properties['example.xml'].data.xpath($path)[0].text}
+ ${self.metadata.Properties['example.xml'].data.xpath(path)[0].text}
Simple Example
==============