summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@mcs.anl.gov>2006-11-07 20:06:04 +0000
committerKen Raffenetti <raffenet@mcs.anl.gov>2006-11-07 20:06:04 +0000
commit16df5512a8ee77d1cd4618bed3b0f09b1867c38e (patch)
treeee083138f506810b48e10a428b220c1852abdd39
parent75e2d050496db86c6ed1e4c8ec8c9c9da6341f77 (diff)
downloadbcfg2-16df5512a8ee77d1cd4618bed3b0f09b1867c38e.tar.gz
bcfg2-16df5512a8ee77d1cd4618bed3b0f09b1867c38e.tar.bz2
bcfg2-16df5512a8ee77d1cd4618bed3b0f09b1867c38e.zip
converting to Django template
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2475 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Hostbase/templates/zone.tmpl37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/lib/Server/Hostbase/templates/zone.tmpl b/src/lib/Server/Hostbase/templates/zone.tmpl
index be4171f6f..142d4dd77 100644
--- a/src/lib/Server/Hostbase/templates/zone.tmpl
+++ b/src/lib/Server/Hostbase/templates/zone.tmpl
@@ -1,22 +1,19 @@
-\$ORIGIN .
-\$TTL $zone[8]
-${zone[1]}. IN SOA $zone[4]. $zone[3]. (
- $zone[2] ; serial
- $zone[7] ; refresh interval
- $zone[6] ; retry interval
- $zone[5] ; expire interval
- $zone[8] ; min ttl
- )
+$ORIGIN .
+$TTL {{ zone.8 }}
+{{ zone.1 }}. IN SOA {{ zone.4 }}. {{ zone.3 }}. (
+ {{ zone.2 }} ; serial
+ {{ zone.7 }} ; refresh interval
+ {{ zone.6 }} ; retry interval
+ {{ zone.5 }} ; expire interval
+ {{ zone.8 }} ; min ttl
+ )
- #for $ns in $nameservers
- NS $ns[0]
- #end for
- #for $a in $addresses
- A $a[0]
- #end for
- #for $mx in $mxs
- MX $mx[0] $mx[1]
- #end for
+ {% for ns in nameservers %}
+ NS {{ ns.0 }}{% endfor %}
+ {% for a in addresses %}
+ A {{ a.0 }}{% endfor %}
+ {% for mx in mxs %}
+ MX {{ mx.0 }} {{ mx.1 }}{% endfor %}
-\$ORIGIN ${zone[1]}.
-localhost A 127.0.0.1
+$ORIGIN {{ zone.1 }}.
+localhost A 127.0.0.1