summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugin.py
diff options
context:
space:
mode:
authorJames Yang <jjyang@mcs.anl.gov>2009-06-30 20:31:14 +0000
committerJames Yang <jjyang@mcs.anl.gov>2009-06-30 20:31:14 +0000
commit8907fa0879422d1845813772765469b101fea216 (patch)
tree41b9dee619a559ba6c73f74c8a2aa948be13b632 /src/lib/Server/Plugin.py
parente915a49930556f4e736775e4fe2d5ff1bf43dfdb (diff)
downloadbcfg2-8907fa0879422d1845813772765469b101fea216.tar.gz
bcfg2-8907fa0879422d1845813772765469b101fea216.tar.bz2
bcfg2-8907fa0879422d1845813772765469b101fea216.zip
Changed how bcfg2-admin init handles plugins and added update_client to metadata for changes in 5305
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5306 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugin.py')
-rw-r--r--src/lib/Server/Plugin.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py
index 4484a655b..f0cbaa693 100644
--- a/src/lib/Server/Plugin.py
+++ b/src/lib/Server/Plugin.py
@@ -48,6 +48,17 @@ class Plugin(object):
self.core = core
self.data = "%s/%s" % (datastore, self.name)
self.logger = logging.getLogger('Bcfg2.Plugins.%s' % (self.name))
+
+ @classmethod
+ def init_repo(self, repo):
+ path = "%s/%s" % (repo, self.name)
+ newpath = ''
+ for subdir in path.split('/'):
+ newpath = newpath + subdir + '/'
+ try:
+ os.mkdir(newpath)
+ except:
+ return
class Generator(object):
'''Generator plugins contribute to literal client configurations'''