summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/development/plugins.txt2
-rw-r--r--doc/server/plugins/generators/tcheetah.txt18
-rw-r--r--doc/server/plugins/generators/tgenshi/clientsxml.txt6
-rw-r--r--doc/server/plugins/generators/tgenshi/test.txt34
4 files changed, 30 insertions, 30 deletions
diff --git a/doc/development/plugins.txt b/doc/development/plugins.txt
index e6a5a73a0..15b512365 100644
--- a/doc/development/plugins.txt
+++ b/doc/development/plugins.txt
@@ -175,7 +175,7 @@ Example Connector
def get_additional_data(self, metadata):
mydata = {}
- for data in self.store.entries['foo.xml'].data.get("foo", []):
+ for data in self.store.entries['foo.xml'].xdata.get("foo", []):
mydata[data] = "bar"
diff --git a/doc/server/plugins/generators/tcheetah.txt b/doc/server/plugins/generators/tcheetah.txt
index ef8bb5513..29fd7affe 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.metadata.Properties.data` is an xml document of unstructured data
+* `self.metadata.Properties.xdata` is an xml document of unstructured data
The ``info`` file is formatted like ``:info`` files from Cfg.
@@ -47,7 +47,7 @@ self.metadata variables
self.metadata is an instance of the class ClientMetadata and documented
:ref:`here <server-plugins-grouping-metadata-clientmetadata>`.
-self.metadata.Properties.data
+self.metadata.Properties.xdata
=============================
.. note::
@@ -56,7 +56,7 @@ self.metadata.Properties.data
:ref:`server-plugins-connectors-properties` plugin in
``/etc/bcfg2.conf``.
-Properties.data is a python `ElementTree <http://codespeak.net/lxml/>`_
+Properties.xdata is a python `ElementTree <http://codespeak.net/lxml/>`_
object, loaded from the data in ``/var/lib/bcfg2/Properties/<properties
file>.xml``. That file should have a ``Properties`` node at its root.
@@ -76,13 +76,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.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}
+ $self.metadata.Properties['example.xml'].xdata.find('host').find('www.example.com').find('rootdev').text
+ $self.metadata.Properties['example.xml'].xdata.find('host').find($self.metadata.hostname).find('rootdev').text
+ ${self.metadata.Properties['example.xml'].xdata.xpath('host/www.example.com/rootdev')[0].text}
+ ${self.metadata.Properties['example.xml'].xdata.xpath('host/' + self.metadata.hostname + '/rootdev')[0].text}
#set $path = 'host/' + $self.metadata.hostname + '/rootdev'
- ${self.metadata.Properties['example.xml'].data.xpath($path)[0].text}
- ${self.metadata.Properties['example.xml'].data.xpath(path)[0].text}
+ ${self.metadata.Properties['example.xml'].xdata.xpath($path)[0].text}
+ ${self.metadata.Properties['example.xml'].xdata.xpath(path)[0].text}
Other Variables
===============
diff --git a/doc/server/plugins/generators/tgenshi/clientsxml.txt b/doc/server/plugins/generators/tgenshi/clientsxml.txt
index 7305ba70d..7a8d1fcc4 100644
--- a/doc/server/plugins/generators/tgenshi/clientsxml.txt
+++ b/doc/server/plugins/generators/tgenshi/clientsxml.txt
@@ -22,7 +22,7 @@ There are two main advantages:
thing to note is how the `name` variable is handled - when
just referring to it the standard `${name}` syntax is used, but
when it is used as a variable in the expression to get the password,
- `password="${metadata.Properties['passwords.xml'].data.find('password').find('bcfg2-client').find(name).text}"`,
+ `password="${metadata.Properties['passwords.xml'].xdata.find('password').find('bcfg2-client').find(name).text}"`,
it is just referred to as `name`.
There is the disadvantage that sometimes 2 passes will be needed to get
@@ -53,7 +53,7 @@ Possible improvements:
profile="${profile}"
name="${name}"
uuid="${name}"
- password="${metadata.Properties['passwords.xml'].data.find('password').find('bcfg2-client').find(name).text}"
+ password="${metadata.Properties['passwords.xml'].xdata.find('password').find('bcfg2-client').find(name).text}"
address="${address}"
location="fixed"
secure="true"
@@ -64,7 +64,7 @@ Possible improvements:
profile="${profile}"
name="${name}"
uuid="${name}"
- password="${metadata.Properties['passwords.xml'].data.find('password').find('bcfg2-client').find(name).text}"
+ password="${metadata.Properties['passwords.xml'].xdata.find('password').find('bcfg2-client').find(name).text}"
location="floating"
secure="true"
/>\
diff --git a/doc/server/plugins/generators/tgenshi/test.txt b/doc/server/plugins/generators/tgenshi/test.txt
index dca578434..c047b88d0 100644
--- a/doc/server/plugins/generators/tgenshi/test.txt
+++ b/doc/server/plugins/generators/tgenshi/test.txt
@@ -45,8 +45,8 @@ This file just shows you what's available. It assumes a
{% end %}\
Two main ways to get the same property value:
- ${metadata.Properties['test.xml'].data.find('password').find('bcfg2').text}
- ${metadata.Properties['test.xml'].data.xpath('password/bcfg2')[0].text}
+ ${metadata.Properties['test.xml'].xdata.find('password').find('bcfg2').text}
+ ${metadata.Properties['test.xml'].xdata.xpath('password/bcfg2')[0].text}
One way to get information about metadata and properties:
@@ -55,28 +55,28 @@ This file just shows you what's available. It assumes a
${var} \
{% end %}
- dir(metadata.Properties.data):
- {% for var in dir(metadata.Properties.data) %}\
+ dir(metadata.Properties.xdata):
+ {% for var in dir(metadata.Properties.xdata) %}\
${var} \
{% end %}
- dir(metadata.Properties.data.entries):
- {% for var in dir(metadata.Properties.data.entries) %}\
+ dir(metadata.Properties.xdata.entries):
+ {% for var in dir(metadata.Properties.xdata.entries) %}\
${var} \
{% end %}
- dir(metadata.Properties.data.label):
- {% for var in dir(metadata.Properties.data.label) %}\
+ dir(metadata.Properties.xdata.label):
+ {% for var in dir(metadata.Properties.xdata.label) %}\
${var} \
{% end %}
- dir(metadata.Properties.data.name):
- {% for var in dir(metadata.Properties.data.name) %}\
+ dir(metadata.Properties.xdata.name):
+ {% for var in dir(metadata.Properties.xdata.name) %}\
${var} \
{% end %}
- dir(metadata.Properties.data.properties):
- {% for var in dir(metadata.Properties.data.properties) %}\
+ dir(metadata.Properties.xdata.properties):
+ {% for var in dir(metadata.Properties.xdata.properties) %}\
${var} \
{% end %}
@@ -113,13 +113,13 @@ this (below reformatted a little bit to fit in 80 columns)::
__weakref__ all bundles categories get_clients_by_group get_clients_by_profile
groups hostname inGrouppassword probes uuid
- dir(metadata.Properties.data):
+ dir(metadata.Properties.xdata):
HandleEvent Index __class__ __delattr__ __dict__ __doc__ __getattribute__
__hash__ __identifier__ __init__ __iter__ __module__ __new__ __reduce__
__reduce_ex__ __repr__ __setattr__ __str__ __weakref__ entries label name
properties
- dir(metadata.Properties.data.entries):
+ dir(metadata.Properties.xdata.entries):
__add__ __class__ __contains__ __delattr__ __delitem__ __delslice__ __doc__
__eq__ __ge__ __getattribute__ __getitem__ __getslice__ __gt__ __hash__
__iadd__ __imul__ __init__ __iter__ __le__ __len__ __lt__ __mul__ __ne__
@@ -127,7 +127,7 @@ this (below reformatted a little bit to fit in 80 columns)::
__setitem__ __setslice__ __str__ append count extend index insert pop remove
reverse sort
- dir(metadata.Properties.data.label):
+ dir(metadata.Properties.xdata.label):
__add__ __class__ __contains__ __delattr__ __doc__ __eq__ __ge__
__getattribute__ __getitem__ __getnewargs__ __getslice__ __gt__ __hash__
__init__ __le__ __len__ __lt__ __mod__ __mul__ __ne__ __new__ __reduce__
@@ -137,7 +137,7 @@ this (below reformatted a little bit to fit in 80 columns)::
rfind rindex rjust rpartition rsplit rstrip split splitlinesstartswith strip
swapcase title translate upper zfill
- dir(metadata.Properties.data.name):
+ dir(metadata.Properties.xdata.name):
__add__ __class__ __contains__ __delattr__ __doc__ __eq__ __ge__
__getattribute__ __getitem__ __getnewargs__ __getslice__ __gt__ __hash__
__init__ __le__ __len__ __lt__ __mod__ __mul__ __ne__ __new__ __reduce__
@@ -147,7 +147,7 @@ this (below reformatted a little bit to fit in 80 columns)::
rfind rindex rjust rpartition rsplit rstrip split splitlinesstartswith strip
swapcase title translate upper zfill
- dir(metadata.Properties.data.properties):
+ dir(metadata.Properties.xdata.properties):
__class__ __contains__ __copy__ __deepcopy__ __delattr__ __delitem__
__delslice__ __doc__ __getattribute__ __getitem__ __getslice__ __hash__
__init__ __iter__ __len__ __new__ __nonzero__ __reduce__ __reduce_ex__