summaryrefslogtreecommitdiffstats
path: root/src/lib/Server
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@mcs.anl.gov>2006-09-05 20:40:06 +0000
committerKen Raffenetti <raffenet@mcs.anl.gov>2006-09-05 20:40:06 +0000
commitfbde04178a68b3e785785c7b793c2362f45cd457 (patch)
treefb046965bcfbeb50288efe64766a5cedc004c288 /src/lib/Server
parente47c3d4991103c9ff3e192b7fbecb80e7be00381 (diff)
downloadbcfg2-fbde04178a68b3e785785c7b793c2362f45cd457.tar.gz
bcfg2-fbde04178a68b3e785785c7b793c2362f45cd457.tar.bz2
bcfg2-fbde04178a68b3e785785c7b793c2362f45cd457.zip
minor formatting, add scotty to list of dhcp servers
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2215 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server')
-rw-r--r--src/lib/Server/Plugins/Hostbase.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/Server/Plugins/Hostbase.py b/src/lib/Server/Plugins/Hostbase.py
index d40291063..27fe98ef7 100644
--- a/src/lib/Server/Plugins/Hostbase.py
+++ b/src/lib/Server/Plugins/Hostbase.py
@@ -56,7 +56,7 @@ class Hostbase(Plugin):
## raise PluginInitError
self.filedata = {}
self.dnsservers = []
- self.dhcpservers = []
+ self.dhcpservers = ['scotty']
self.templates = {'zone':Template(open(self.data + '/templates/' + 'zone.tmpl').read()),
'reversesoa':Template(open(self.data + '/templates/' + 'reversesoa.tmpl').read()),
'named':Template(open(self.data + '/templates/' + 'named.tmpl').read()),
@@ -67,8 +67,11 @@ class Hostbase(Plugin):
}
self.Entries['ConfigFile'] = {}
self.__rmi__ = ['rebuildState']
- self.rebuildState()
-
+ try:
+ self.rebuildState()
+ except:
+ raise PluginInitError
+
def FetchFile(self, entry, metadata):
'''Return prebuilt file data'''
fname = entry.get('name').split('/')[-1]
@@ -94,10 +97,7 @@ class Hostbase(Plugin):
def rebuildState(self):
'''Pre-cache all state information for hostbase config files'''
- try:
- from django.db import connection
- except:
- raise PluginInitError
+ from django.db import connection
cursor = connection.cursor()
cursor.execute("SELECT id, serial FROM hostbase_zone")
@@ -432,16 +432,16 @@ Name Room User Type
from django.db import connection
header = """+@machines
- +@all-machines
- achilles.ctd.anl.gov
- raven.ops.anl.gov
- seagull.hr.anl.gov
- parrot.ops.anl.gov
- condor.ops.anl.gov
- delphi.esh.anl.gov
- anlcv1.ctd.anl.gov
- anlvms.ctd.anl.gov
- olivia.ctd.anl.gov\n\n"""
++@all-machines
+achilles.ctd.anl.gov
+raven.ops.anl.gov
+seagull.hr.anl.gov
+parrot.ops.anl.gov
+condor.ops.anl.gov
+delphi.esh.anl.gov
+anlcv1.ctd.anl.gov
+anlvms.ctd.anl.gov
+olivia.ctd.anl.gov\n\n"""
cursor = connection.cursor()
cursor.execute("""