summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/TGenshi/tmp/bar/template.txt20
-rw-r--r--examples/TGenshi/tmp/foo/template.xml46
2 files changed, 66 insertions, 0 deletions
diff --git a/examples/TGenshi/tmp/bar/template.txt b/examples/TGenshi/tmp/bar/template.txt
new file mode 100644
index 000000000..3e43340fe
--- /dev/null
+++ b/examples/TGenshi/tmp/bar/template.txt
@@ -0,0 +1,20 @@
+[communication]
+protocol = xmlrpc/ssl
+#if metadata.uuid != None
+user = $metadata.uuid
+#end
+#choose
+#when metadata.password is not None
+password = $metadata.password
+#end
+#when metadata.password is None
+password = GlobalPassword
+#end
+#end
+fingerprint = ac152f42f03253a30d3379dea88eddf2be033d47
+
+[client]
+drivers = Action,Chkconfig,POSIX,YUMng
+
+[components]
+bcfg2 = https://config.example.com:6789
diff --git a/examples/TGenshi/tmp/foo/template.xml b/examples/TGenshi/tmp/foo/template.xml
new file mode 100644
index 000000000..522c6e7fe
--- /dev/null
+++ b/examples/TGenshi/tmp/foo/template.xml
@@ -0,0 +1,46 @@
+<html xmlns:py="http://genshi.edgewall.org/">
+ <head>
+ <title>${name}</title>
+ </head>
+ <body>
+ <table>
+ <tr><th>Name:</th><td>${name}</td></tr>
+ <tr><th>Hostname:</th><td>${metadata.hostname}</td></tr>
+ <tr><th>Toolset:</th><td>${metadata.hostname}</td></tr>
+ <tr><th>UUID:</th><td>${metadata.uuid}</td></tr>
+ <tr><th>Password:</th><td>${metadata.password}</td></tr>
+ <tr>
+ <th>Bundles:</th>
+ <td>
+ <table>
+ <tr py:for="bundle in metadata.bundles"><td>${bundle}</td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>Groups:</th>
+ <td>
+ <table>
+ <tr py:for="group in metadata.groups"><td>${group}</td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>Categories:</th>
+ <td>
+ <table>
+ <tr py:for="category in metadata.categories"><td>${category}</td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>Probes:</th>
+ <td>
+ <table>
+ <tr py:for="probe in metadata.probes"><td>${probe}</td><td>${metadata.probes[probe]}</td></tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>