Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/buildbot/buildbot/slave/registry.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildbot/buildbot/slave/registry.py')
-rw-r--r--buildbot/buildbot/slave/registry.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/buildbot/buildbot/slave/registry.py b/buildbot/buildbot/slave/registry.py
new file mode 100644
index 0000000..772aad3
--- /dev/null
+++ b/buildbot/buildbot/slave/registry.py
@@ -0,0 +1,17 @@
+
+commandRegistry = {}
+
+def registerSlaveCommand(name, factory, version):
+ """
+ Register a slave command with the registry, making it available in slaves.
+
+ @type name: string
+ @param name: name under which the slave command will be registered; used
+ for L{buildbot.slave.bot.SlaveBuilder.remote_startCommand}
+
+ @type factory: L{buildbot.slave.commands.Command}
+ @type version: string
+ @param version: version string of the factory code
+ """
+ assert not commandRegistry.has_key(name)
+ commandRegistry[name] = (factory, version)