diff options
author | Fabian Affolter <fabian@bernewireless.net> | 2010-06-08 08:16:41 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2010-06-09 08:09:54 -0500 |
commit | a2755d2d1a111ad4e55f88a166a5b02856d363cd (patch) | |
tree | 82dabe1dbbe429e9d5cbe554ffb16702a79041d2 /src/lib/Server/Plugins/Hostbase.py | |
parent | e31f5234256e5234348fc67cf45e6f3462e1fbb8 (diff) | |
download | bcfg2-a2755d2d1a111ad4e55f88a166a5b02856d363cd.tar.gz bcfg2-a2755d2d1a111ad4e55f88a166a5b02856d363cd.tar.bz2 bcfg2-a2755d2d1a111ad4e55f88a166a5b02856d363cd.zip |
Updated files to match PEP 257
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5904 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Hostbase.py')
-rw-r--r-- | src/lib/Server/Plugins/Hostbase.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/Server/Plugins/Hostbase.py b/src/lib/Server/Plugins/Hostbase.py index 0ad34208d..65992596d 100644 --- a/src/lib/Server/Plugins/Hostbase.py +++ b/src/lib/Server/Plugins/Hostbase.py @@ -16,7 +16,7 @@ import cStringIO class Hostbase(Bcfg2.Server.Plugin.Plugin, Bcfg2.Server.Plugin.Structure, Bcfg2.Server.Plugin.Generator): - '''The Hostbase plugin handles host/network info''' + """The Hostbase plugin handles host/network info.""" name = 'Hostbase' __version__ = '$Id$' __author__ = 'bcfg-dev@mcs.anl.gov' @@ -50,7 +50,7 @@ class Hostbase(Bcfg2.Server.Plugin.Plugin, raise PluginInitError def FetchFile(self, entry, metadata): - '''Return prebuilt file data''' + """Return prebuilt file data.""" fname = entry.get('name').split('/')[-1] if not fname in self.filedata: raise PluginExecutionError @@ -59,7 +59,7 @@ class Hostbase(Bcfg2.Server.Plugin.Plugin, entry.text = self.filedata[fname] def BuildStructures(self, metadata): - '''Build hostbase bundle''' + """Build hostbase bundle.""" if metadata.hostname not in self.dnsservers or metadata.hostname not in self.dhcpservers: return [] output = Element("Bundle", name='hostbase') @@ -72,8 +72,10 @@ class Hostbase(Bcfg2.Server.Plugin.Plugin, return [output] def rebuildState(self, _): - '''Pre-cache all state information for hostbase config files - callable as an XMLRPC function''' + """Pre-cache all state information for hostbase config files + callable as an XMLRPC function. + + """ self.buildZones() self.buildDHCP() self.buildHosts() @@ -83,7 +85,7 @@ class Hostbase(Bcfg2.Server.Plugin.Plugin, return True def buildZones(self): - '''Pre-build and stash zone files''' + """Pre-build and stash zone files.""" cursor = connection.cursor() cursor.execute("SELECT id, serial FROM hostbase_zone") @@ -314,7 +316,7 @@ class Hostbase(Bcfg2.Server.Plugin.Plugin, def buildDHCP(self): - '''Pre-build dhcpd.conf and stash in the filedata table''' + """Pre-build dhcpd.conf and stash in the filedata table.""" # fetches all the hosts with DHCP == True cursor = connection.cursor() @@ -362,7 +364,7 @@ class Hostbase(Bcfg2.Server.Plugin.Plugin, def buildHosts(self): - '''Pre-build and stash /etc/hosts file''' + """Pre-build and stash /etc/hosts file.""" append_data = [] |