Package qm :: Package test :: Package classes :: Module ssh_host :: Class RSHHost
[hide private]
[frames] | no frames]

Class RSHHost

source code

         object --+            
                  |            
extension.Extension --+        
                      |        
              host.Host --+    
                          |    
                    SSHHost --+
                              |
                             RSHHost

An 'RSHHost' is an 'SSHHost' that uses 'rsh' instead of 'ssh'.

The reason that 'RSHHost' is a separate class is that (a) that makes it easier for users to construct an 'SSHHost', and (b) 'rsh' does not return the exit code of the remote program, so 'Run' requires adjustment.

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)
Run a program on the remote host.
source code

Inherited from SSHHost: DeleteFile, DownloadFile, UploadFile

Inherited from SSHHost (private): _FormSCPCommandLine, _FormSSHCommandLine

Inherited from host.Host: UploadAndRun, __init__

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

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

Class Variables [hide private]
  ssh_program = TextField(default_value= "rsh", description= """...
  scp_program = TextField(default_value= "rcp", description= """...

Inherited from SSHHost: default_dir, host_name, nfs_dir, scp_args, ssh_args, user_name

Inherited from host.Host: kind

Inherited from extension.Extension: arguments

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

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]

ssh_program

Value:
TextField(default_value= "rsh", description= """The path to the remote\
 shell program.""")

scp_program

Value:
TextField(default_value= "rcp", description= """The path to the remote\
 copy program.""")