summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-11-22 22:51:30 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-11-22 22:51:30 +0000
commitc75deeb47e2a50636c7db903978ffeef2b2babfc (patch)
treedc449ef55ddcbc755e12e3055e76099407462eff /src
parent07da7055e7844a735a9b79507d0c2851a2249789 (diff)
downloadbcfg2-c75deeb47e2a50636c7db903978ffeef2b2babfc.tar.gz
bcfg2-c75deeb47e2a50636c7db903978ffeef2b2babfc.tar.bz2
bcfg2-c75deeb47e2a50636c7db903978ffeef2b2babfc.zip
Remove Chiba Plugin (It has been replaced using a TCheetah template)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2529 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Chiba.py43
-rw-r--r--src/lib/Server/Plugins/__init__.py2
2 files changed, 1 insertions, 44 deletions
diff --git a/src/lib/Server/Plugins/Chiba.py b/src/lib/Server/Plugins/Chiba.py
deleted file mode 100644
index c633272fc..000000000
--- a/src/lib/Server/Plugins/Chiba.py
+++ /dev/null
@@ -1,43 +0,0 @@
-'''This module configures files in a Chiba City specific way'''
-__revision__ = '$Revision$'
-
-import socket, Bcfg2.Server.Plugin
-
-class ChibaConf(Bcfg2.Server.Plugin.SingleXMLFileBacked):
- '''This class encapsulates all information needed for all Chiba config ops'''
- pass
-
-class Chiba(Bcfg2.Server.Plugin.Plugin):
- '''the Chiba generator builds the following files:
- -> /etc/fstab
- -> /etc/network/interfaces
- -> /etc/dhcpd.conf
- -> /tftpboot/<node>.lst'''
-
- __name__ = 'Chiba'
- __version__ = '$Id$'
- __author__ = 'bcfg-dev@mcs.anl.gov'
-
- def __init__(self, core, datastore):
- Bcfg2.Server.Plugin.Plugin.__init__(self, core, datastore)
- self.repo = Bcfg2.Server.Plugin.DirectoryBacked(self.data, self.core.fam)
- self.Entries = {'ConfigFile': {'/etc/network/interfaces':self.build_interfaces}}
-
- def build_interfaces(self, entry, metadata):
- '''build network configs for clients'''
- entry.attrib['owner'] = 'root'
- entry.attrib['group'] = 'root'
- entry.attrib['perms'] = '0644'
- try:
- myriname = "%s-myr.%s" % (metadata.hostname.split('.')[0],
- ".".join(metadata.hostname.split('.')[1:]))
- myriaddr = socket.gethostbyname(myriname)
- except socket.gaierror:
- self.logger.error("Failed to resolve %s"% myriname)
- raise Bcfg2.Server.Plugin.PluginExecutionError, (myriname, 'lookup')
- if metadata.hostname.split('.')[0] == 'ccsched':
- entry.text = self.repo.entries['interfaces-template.ccsched'].data % myriaddr
- else:
- entry.text = self.repo.entries['interfaces-template'].data % myriaddr
-
-
diff --git a/src/lib/Server/Plugins/__init__.py b/src/lib/Server/Plugins/__init__.py
index 21351fe8f..f863fdce0 100644
--- a/src/lib/Server/Plugins/__init__.py
+++ b/src/lib/Server/Plugins/__init__.py
@@ -1,5 +1,5 @@
'''imports for Bcfg2.Server.Plugins'''
__revision__ = '$Revision$'
-all = ['Account', 'Base', 'Bundler', 'Cfg', 'Chiba', 'Hostbase', 'Metadata',
+all = ['Account', 'Base', 'Bundler', 'Cfg', 'Hostbase', 'Metadata',
'Pkgmgr', 'Rules', 'SSHbase', 'Svcmgr', 'Vhost']