Package buildslave :: Package commands :: Module registry
[frames] | no frames]

Source Code for Module buildslave.commands.registry

 1  from twisted.python import reflect 
 2   
 3  commandRegistry = { 
 4      # command name : fully qualified factory name (callable) 
 5      "shell" : "buildslave.commands.shell.SlaveShellCommand", 
 6      "uploadFile" : "buildslave.commands.transfer.SlaveFileUploadCommand", 
 7      "uploadDirectory" : "buildslave.commands.transfer.SlaveDirectoryUploadCommand", 
 8      "downloadFile" : "buildslave.commands.transfer.SlaveFileDownloadCommand", 
 9      "svn" : "buildslave.commands.svn.SVN", 
10      "bk" : "buildslave.commands.bk.BK", 
11      "cvs" : "buildslave.commands.cvs.CVS", 
12      "darcs" : "buildslave.commands.darcs.Darcs", 
13      "git" : "buildslave.commands.git.Git", 
14      "bzr" : "buildslave.commands.bzr.Bzr", 
15      "hg" : "buildslave.commands.hg.Mercurial", 
16      "p4" : "buildslave.commands.p4.P4", 
17      "p4sync" : "buildslave.commands.p4.P4Sync", 
18  } 
19   
20 -def getFactory(command):
21 factory_name = commandRegistry[command] 22 factory = reflect.namedObject(factory_name) 23 return factory
24
25 -def getAllCommandNames():
26 return commandRegistry.keys()
27