Trees | Indices | Help |
|
---|
|
1 # This file is part of Buildbot. Buildbot is free software: you can 2 # redistribute it and/or modify it under the terms of the GNU General Public 3 # License as published by the Free Software Foundation, version 2. 4 # 5 # This program is distributed in the hope that it will be useful, but WITHOUT 6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 # details. 9 # 10 # You should have received a copy of the GNU General Public License along with 11 # this program; if not, write to the Free Software Foundation, Inc., 51 12 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 # 14 # Copyright Buildbot Team Members 15 16 from twisted.internet import defer 17 from buildbot.clients import usersclient 18 from buildbot.process.users import users 19 from buildbot.util import in_reactor24 25 master = config.get('master') 26 op = config.get('op') 27 username = config.get('username') 28 passwd = config.get('passwd') 29 master, port = master.split(":") 30 port = int(port) 31 bb_username = config.get('bb_username') 32 bb_password = config.get('bb_password') 33 if bb_username or bb_password: 34 bb_password = users.encrypt(bb_password) 35 info = config.get('info') 36 ids = config.get('ids') 37 38 # find identifier if op == add 39 if info and op == 'add': 40 for user in info: 41 user['identifier'] = sorted(user.values())[0] 42 43 uc = usersclient.UsersClient(master, username, passwd, port) 44 yield uc.send(op, bb_username, bb_password, ids, info) 45 46 defer.returnValue(0)47
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Nov 21 16:22:54 2012 | http://epydoc.sourceforge.net |