diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Admin/Pull.py | 7 | ||||
-rw-r--r-- | src/lib/Server/Plugins/Cfg.py | 3 | ||||
-rw-r--r-- | src/lib/Server/Plugins/SSHbase.py | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/Server/Admin/Pull.py b/src/lib/Server/Admin/Pull.py index ecf86787e..60f528c1d 100644 --- a/src/lib/Server/Admin/Pull.py +++ b/src/lib/Server/Admin/Pull.py @@ -96,8 +96,11 @@ class Pull(Bcfg2.Server.Admin.MetadataCore): ename in gen.Entries.get(etype, {})] if len(glist) != 1: self.errExit("Got wrong numbers of matching generators for entry:" \ - + "%s" % ([g.__name__ for g in glist])) + + "%s" % ([g.name for g in glist])) plugin = glist[0] + if not isinstance(plugin, Bcfg2.Server.Plugin.PullSource): + self.errExit("Configuration upload not supported by plugin %s" \ + % (plugin.name)) try: choices = plugin.AcceptChoices(new_entry, meta) specific = self.Choose(choices) @@ -105,5 +108,5 @@ class Pull(Bcfg2.Server.Admin.MetadataCore): plugin.AcceptPullData(specific, new_entry, self.log) except Bcfg2.Server.Plugin.PluginExecutionError: self.errExit("Configuration upload not supported by plugin %s" \ - % (plugin.__name__)) + % (plugin.name)) # FIXME svn commit if running under svn diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py index 02d912206..9bf1ed4bd 100644 --- a/src/lib/Server/Plugins/Cfg.py +++ b/src/lib/Server/Plugins/Cfg.py @@ -125,7 +125,8 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet): if log: logger.info("Wrote file %s" % infofile.name) -class Cfg(Bcfg2.Server.Plugin.GroupSpool): +class Cfg(Bcfg2.Server.Plugin.GroupSpool, + Bcfg2.Server.Plugin.PullSource): '''This generator in the configuration file repository for bcfg2''' name = 'Cfg' __version__ = '$Id$' diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py index e3e0f739b..40f2cb721 100644 --- a/src/lib/Server/Plugins/SSHbase.py +++ b/src/lib/Server/Plugins/SSHbase.py @@ -6,7 +6,8 @@ import Bcfg2.Server.Plugin class SSHbase(Bcfg2.Server.Plugin.Plugin, Bcfg2.Server.Plugin.Generator, - Bcfg2.Server.Plugin.DirectoryBacked): + Bcfg2.Server.Plugin.DirectoryBacked, + Bcfg2.Server.Plugin.PullSource): '''The sshbase generator manages ssh host keys (both v1 and v2) for hosts. It also manages the ssh_known_hosts file. It can integrate host keys from other management domains and similarly |