From 8907fa0879422d1845813772765469b101fea216 Mon Sep 17 00:00:00 2001 From: James Yang Date: Tue, 30 Jun 2009 20:31:14 +0000 Subject: 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 --- src/lib/Server/Plugin.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lib/Server/Plugin.py') 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''' -- cgit v1.2.3-1-g7c22