Package buildbot :: Package process :: Package users :: Module manual :: Class CommandlineUserManagerPerspective
[frames] | no frames]

Class CommandlineUserManagerPerspective

source code

twisted.spread.pb.Avatar --+    
                           |    
   pbutil.NewCredPerspective --+
                               |
                              CommandlineUserManagerPerspective

Perspective registered in buildbot.pbmanager and contains the real workings of `buildbot user` by working with the database when perspective_commandline is called.

Instance Methods
 
__init__(self, master) source code
 
formatResults(self, op, results)
This formats the results of the database operations for printing back to the caller
source code
 
perspective_commandline(*args, **kwargs)
This performs the requested operations from the `buildbot user` call by calling the proper buildbot.db.users methods based on the operation.
source code

Inherited from pbutil.NewCredPerspective: __provides__, attached, detached

Inherited from twisted.spread.pb.Avatar: __providedBy__, perspectiveMessageReceived

Class Variables

Inherited from pbutil.NewCredPerspective: __implemented__

Method Details

formatResults(self, op, results)

source code 

This formats the results of the database operations for printing back to the caller

Parameters:
  • op (string) - operation to perform (add, remove, update, get)
  • results (list) - results from db queries in perspective_commandline
Returns:
string containing formatted results

perspective_commandline(*args, **kwargs)

source code 

This performs the requested operations from the `buildbot user` call by calling the proper buildbot.db.users methods based on the operation. It yields a deferred instance with the results from the database methods.

Parameters:
  • op (string) - operation to perform (add, remove, update, get)
  • bb_username (string) - username portion of auth credentials
  • bb_password (hashed string) - hashed password portion of auth credentials
  • ids (list of strings or None) - user identifiers used to find existing users
  • info (list of dictionaries or None) - type/value pairs for each user that will be added or updated in the database
Returns:
results from db.users methods via deferred
Decorators:
  • @defer.deferredGenerator