Package qm :: Package test :: Package classes :: Module command_host :: Class CommandHost
[hide private]
[frames] | no frames]

Class CommandHost
source code

         object --+            
                  |            
extension.Extension --+        
                      |        
              host.Host --+    
                          |    
       local_host.LocalHost --+
                              |
                             CommandHost

A CommandHost runs an executable through a command.

The 'command' parameter specifies the command to use, while 'command_args' contains a set of arguments to be passed to the command.

Nested Classes [hide private]

Inherited from host.Host: Executable

Inherited from extension.Extension: Type, __metaclass__


Instance Methods [hide private]
  Run(self, path, arguments, environment=None, timeout=-1, relative=False)
Run a program on the remote host.

Inherited from local_host.LocalHost: DeleteFile, DownloadFile, UploadAndRun, UploadFile

Inherited from local_host.LocalHost (private): _SameFile

Inherited from host.Host: __init__

Inherited from extension.Extension: GetClassName, GetExplicitArguments, MakeDomDocument, MakeDomElement, Write, __getattr__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables [hide private]
command  
command_args  
_argument_dictionary A map from argument names to 'Field' instances.
_argument_list A list of all the 'Field's in this class.

Inherited from host.Host: kind

Inherited from extension.Extension: arguments

Inherited from object: __class__


Method Details [hide private]

Run(self, path, arguments, environment=None, timeout=-1, relative=False)

source code 

Run a program on the remote host.

'path' -- The name of the program to run, on the remote host. If 'relative' is true, or if 'path' is not an absolute path but does contain at least one directory separator, then 'path' is interpreted relative to the default directory. Otherwise, 'path' is used unmodified.

'arguments' -- The sequence of arguments that should be passed to the program.

'environment' -- If not 'None', a dictionary of pairs of strings to add to the environment of the running program.

'timeout' -- The number of seconds the program is permitted to execute. After the 'timeout' expires, the program will be terminated. However, in some cases (such as when using 'rsh') it will be the local side of the connection that is closed. The remote side of the connection may or may not continue to operate, depending on the vagaries of the remote operating system.

returns -- A pair '(status, output)'. The 'status' is the exit status returned by the program, or 'None' if the exit status is not available. The 'output' is a string giving the combined standard output and standard error output from the program.
Overrides: host.Host.Run
(inherited documentation)

Class Variable Details [hide private]

command

Value:
''                                                                     
      

command_args

Value:
[]                                                                     
      

_argument_dictionary

A map from argument names to 'Field' instances.

A map from the names of arguments for this class to the corresponding 'Field'.
Value:
{'command': <<class 'qm.fields.TextField'> command>,
 'command_args': <<class 'qm.fields.SetField'> command_args>}          
      

_argument_list

A list of all the 'Field's in this class.

This list combines the complete list of 'arguments'. 'Field's appear in the order reached by a pre-order breadth-first traversal of the hierarchy, starting from the most derived class.
Value:
[<<class 'qm.fields.TextField'> command>,
 <<class 'qm.fields.SetField'> command_args>]