summaryrefslogtreecommitdiffstats
path: root/generators
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2004-06-09 18:36:20 +0000
committerNarayan Desai <desai@mcs.anl.gov>2004-06-09 18:36:20 +0000
commit967d6c73c0a1b495b4d5cba48c5133ad69402048 (patch)
tree5000bb08c3854460dad71dc6b93ddf3feb3fe4bf /generators
parentb0c4e8fb6ce4c8aa3363452bd2cfa320ffa164e5 (diff)
downloadbcfg2-967d6c73c0a1b495b4d5cba48c5133ad69402048.tar.gz
bcfg2-967d6c73c0a1b495b4d5cba48c5133ad69402048.tar.bz2
bcfg2-967d6c73c0a1b495b4d5cba48c5133ad69402048.zip
update to new API
(Logical change 1.21) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@94 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'generators')
-rw-r--r--generators/account.py9
-rw-r--r--generators/servicemgr.py2
2 files changed, 5 insertions, 6 deletions
diff --git a/generators/account.py b/generators/account.py
index 760725a0b..b3f74beac 100644
--- a/generators/account.py
+++ b/generators/account.py
@@ -8,11 +8,6 @@ class account(Generator):
__name__ = 'account'
__version__ = '$Id$'
__author__ = 'bcfg-dev@mcs.anl.gov'
- __provides__ = {'ConfigFile':{'/etc/passwd':"GenFromYP",
- '/etc/group':"GenFromYP",
- '/etc/security/limits.conf':"GenLimits",
- '/root/.ssh/authorized_keys':"GenRootKeys"}}
-
__doc__ = '''This module generates account config files, based on an internal data repo:
static.(passwd|group|limits.conf) -> static entries
dyn.(passwd|group) -> dynamic entries (usually acquired from yp)
@@ -24,6 +19,10 @@ class account(Generator):
def __setup__(self):
self.repository = DirectoryBacked(self.data)
self.ssh = DirectoryBacked("%s/ssh"%(self.data))
+ self.__provides__ = {'ConfigFile':{'/etc/passwd':self.GenFromYP,
+ '/etc/group':self.GenFromYP,
+ '/etc/security/limits.conf':self.GenLimits,
+ '/root/.ssh/authorized_keys':self.GenRootKeys}}
def GenFromYP(self,filename,client):
fname = filename.split('/')[-1]
diff --git a/generators/servicemgr.py b/generators/servicemgr.py
index e263b3961..40c4ffc47 100644
--- a/generators/servicemgr.py
+++ b/generators/servicemgr.py
@@ -12,7 +12,7 @@ class servicemgr(Generator):
__provides__ = {'Service':{'sshd':'GetService'}}
- def GetService(self,name,client):
+ def GetService(self,name,metadata):
# for now sshd is on
if name == 'sshd':
return Service('sshd','chkconfig','on','global')