From 29ea24a6841e25226d5c90752c40606c622c149d Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 8 Nov 2004 20:59:47 +0000 Subject: pylint fixes 2004/11/05 13:05:55-06:00 anl.gov!desai kill __setup__ usage (Logical change 1.148) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@659 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Generators/Chiba.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/lib/Server/Generators/Chiba.py b/src/lib/Server/Generators/Chiba.py index efb165ab7..6f442cbe7 100644 --- a/src/lib/Server/Generators/Chiba.py +++ b/src/lib/Server/Generators/Chiba.py @@ -1,13 +1,12 @@ -from re import compile as regcompile -from Bcfg2.Server.Generator import Generator, DirectoryBacked, SingleXMLFileBacked - '''This module configures files in a Chiba City specific way''' __revision__ = '$Revision$' +from re import compile as regcompile +from Bcfg2.Server.Generator import Generator, DirectoryBacked, SingleXMLFileBacked + class ChibaConf(SingleXMLFileBacked): '''This class encapsulates all information needed for all Chiba config ops''' - def Index(self): - pass + pass class Chiba(Generator): '''the Chiba generator builds the following files: @@ -23,7 +22,13 @@ class Chiba(Generator): mayor = regcompile("\$MAYOR") + def __init__(self, core, datastore): + Generator.__init__(self, core, datastore) + self.repo = DirectoryBacked(self.data, self.core.fam) + self.__provides__['ConfigFile']['/etc/fstab'] = self.build_fstab + def get_mayor(self, node): + '''Get mayor for node''' if 'ccn' in node: return 'cct%sm.mcs.anl.gov' % ((int(node[3:]) / 32) + 1) elif 'ccviz' in node: @@ -33,10 +38,6 @@ class Chiba(Generator): else: return 'ccprez.mcs.anl.gov' - def __setup__(self): - self.repo = DirectoryBacked(self.data, self.core.fam) - self.__provides__['ConfigFile']['/etc/fstab'] = self.build_fstab - def build_fstab(self, entry, metadata): '''build fstab for chiba nodes''' node = metadata.hostname.split('.')[0] -- cgit v1.2.3-1-g7c22