Class RemoteCommand
source code
 twisted.spread.jelly.Jellyable --+        
                                  |        
twisted.spread.flavors.Serializable --+    
                                      |    
   twisted.spread.flavors.Referenceable --+
                                          |
                                         RemoteCommand
- Known Subclasses:
 
- 
      
 
I represent a single command to be run on the slave. I handle the 
  details of reliably gathering status updates from the slave 
  (acknowledging each), and (eventually, in a future release) recovering 
  from interrupted builds. This is the master-side object that is known to 
  the slave-side buildbot.slave.bot.SlaveBuilder,
  to which status updates are sent.
  My command should be started by calling .run(), which returns a 
  Deferred that will fire when the command has finished, or will errback if
  an exception is raised.
  Typically __init__ or run() will set up self.remote_command to be a 
  string which corresponds to one of the SlaveCommands registered in the 
  buildslave, and self.args to a dictionary of arguments that will be 
  passed to the SlaveCommand instance.
  start, remoteUpdate, and remoteComplete are available to be 
  overridden
    | 
       
     | 
      
      
     | 
  
    | 
       
     | 
      
      
     | 
  
    
      twisted.internet.defer.Deferred
     | 
      
      
     | 
  
    | 
       
     | 
      
      
     | 
  
    | 
       
     | 
      
        
          remote_update(self,
        updates) 
      I am called by the slave's buildbot.slave.bot.SlaveBuilder so I can receive 
      updates from the running remote command. | 
          
            source code
            
           | 
         
       
      
     | 
  
    | 
       
     | 
      
      
     | 
  
    | 
      None
     | 
      
        
          remote_complete(self,
        failure=None) 
      Called by the slave's buildbot.slave.bot.SlaveBuilder to notify me the 
      remote command has finished. | 
          
            source code
            
           | 
         
       
      
     | 
  
    | 
       
     | 
      
      
     | 
  
  
    | 
     Inherited from twisted.spread.flavors.Referenceable:
      __provides__,
      jellyFor,
      remoteMessageReceived
       
    Inherited from twisted.spread.flavors.Serializable:
      processUniqueID
       
    Inherited from twisted.spread.jelly.Jellyable:
      __providedBy__,
      getStateFor
       
     | 
  
    | 
      list of one int
     | 
        commandCounter = 0 
      provides a unique value for each RemoteCommand executed across all 
      slaves
     | 
  
  
    | 
     Inherited from twisted.spread.flavors.Referenceable:
      __implemented__,
      perspective
       
     | 
  
    | 
      boolean
     | 
        active = False 
      whether the command is currently running
     | 
  
  
  
  __init__(self,
        remote_command,
        args,
        ignore_updates=False)
     (Constructor)
  
   | source code 
     | 
    
  
  
  
    - Parameters:
 
    
        remote_command (string) - remote command to start.  This will be passed to buildbot.slave.bot.SlaveBuilder.remote_startCommand
          and needs to have been registered slave-side in buildbot.slave.registry 
        args (dict) - arguments to send to the remote command 
        ignore_updates - if true, ignore any updates from the slave side 
      
   
 | 
 
| 
  
  
   Tell the slave to start executing the remote command. 
  
    - Returns: 
twisted.internet.defer.Deferred 
        - a deferred that will fire when the remote command is done (with 
          None as the result)
 
   
 | 
 
| 
  
  
   I am called by the slave's buildbot.slave.bot.SlaveBuilder so I can receive 
  updates from the running remote command. 
  
    - Parameters:
 
    
        updates (list of [object, int]) - list of updates from the remote command 
      
   
 | 
 
| 
  
  
   Called by the slave's buildbot.slave.bot.SlaveBuilder to notify me the 
  remote command has finished. 
  
    - Parameters:
 
    
        failure (twisted.python.failure.Failure or None) 
      
    - Returns: None
 
   
 | 
 
| 
  
  
   Subclasses can override this. 
  This is called when the RemoteCommand has finished. 'maybeFailure' 
  will be None if the command completed normally, or a Failure instance in 
  one of the following situations: 
  
    - 
      the slave was lost before the command was started
    
 
    - 
      the slave didn't respond to the startCommand message
    
 
    - 
      the slave raised an exception while starting the command (bad command
      name, bad args, OSError from missing executable)
    
 
    - 
      the slave raised an exception while finishing the command (they send 
      back a remote_complete message with a Failure payload)
    
 
   
  and also (for now): 
  
    - 
      slave disconnected while the command was running
    
 
   
  This method should do cleanup, like closing log files. It should 
  normally return the 'failure' argument, so that any exceptions will be 
  propagated to the Step. If it wants to consume them, return None 
  instead. 
  
   
 |