summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@mcs.anl.gov>2006-12-08 21:34:03 +0000
committerKen Raffenetti <raffenet@mcs.anl.gov>2006-12-08 21:34:03 +0000
commitf930ee284c1d068927d686b340db09b3fc2764fe (patch)
tree2fc5e1fe9435ee5efed063d8dfb87d3fabd452c8 /src/lib/Server/Plugins
parentb4e7d85d3ce3ff9ea1254a055064d58a56d40070 (diff)
downloadbcfg2-f930ee284c1d068927d686b340db09b3fc2764fe.tar.gz
bcfg2-f930ee284c1d068927d686b340db09b3fc2764fe.tar.bz2
bcfg2-f930ee284c1d068927d686b340db09b3fc2764fe.zip
fixed bug in reverse lookup generation
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2574 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/Hostbase.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Hostbase.py b/src/lib/Server/Plugins/Hostbase.py
index 85766ed65..55b73b7da 100644
--- a/src/lib/Server/Plugins/Hostbase.py
+++ b/src/lib/Server/Plugins/Hostbase.py
@@ -2,7 +2,7 @@
__revision__ = '$Revision$'
import sys, os
-os.environ['DJANGO_SETTINGS_MODULE'] = 'Hostbase.settings'
+os.environ['DJANGO_SETTINGS_MODULE'] = 'Bcfg2.Server.Hostbase.settings'
from lxml.etree import Element, SubElement
from syslog import syslog, LOG_INFO
from Bcfg2.Server.Plugin import Plugin, PluginExecutionError, PluginInitError, DirectoryBacked
@@ -235,6 +235,7 @@ class Hostbase(Plugin):
reversenames.sort()
for filename in reversenames:
+ print filename
originlist = []
cursor.execute("""
SELECT h.hostname, p.ip_addr FROM ((hostbase_host h
@@ -250,7 +251,7 @@ class Hostbase(Plugin):
if (".".join([ip[1].split(".")[2], filename[0]]),
".".join([filename[1], ip[1].split(".")[2]])) not in originlist]
for origin in originlist:
- hosts = [host.__add__((host[1].split("."), host[0].split(".", 1)))
+ hosts = [(host[1].split("."), host[0].split(".", 1))
for host in reversehosts
if host[1].rstrip('0123456789').rstrip('.') == origin[1]]
context = Context({
@@ -261,7 +262,7 @@ class Hostbase(Plugin):
self.filedata['%s.rev' % filename[0]] += self.templates['reverseapp'].render(context)
else:
originlist = [filename[0]]
- hosts = [host.__add__((host[1].split("."), host[0].split(".", 1)))
+ hosts = [(host[1].split("."), host[0].split(".", 1))
for host in reversehosts]
context = Context({
'hosts': hosts,
@@ -269,6 +270,7 @@ class Hostbase(Plugin):
'fileorigin': None,
})
self.filedata['%s.rev' % filename[0]] += self.templates['reverseapp'].render(context)
+ print hosts
self.Entries['ConfigFile']['%s/%s.rev' % (self.filepath, filename[0])] = self.FetchFile
def buildDHCP(self):