Module dCacheAdmin :: Class Admin
[hide private]
[frames] | no frames]

Class Admin

Object representing the dCache Admin interface connection.

Only one thread should access this at a time. If you want to have multi- threaded access to the admin interface, the recommendation is to create one connection per thread.

Instance Methods [hide private]
 
__init__(self, info, timeout=5)
Connects to the admin interface.
 
cd(self, cell)
Change to a different cell.
 
execute(self, cell, command, args=[])
Execute a command in the admin interface
 
fork_ssh(self, args)
 
logoff(self)
Logoff the admin interface.
 
make_connection(self, info)
 
read(self, max_read)
 
readlines(self, matches=[])
 
write(self, text)
Method Details [hide private]

__init__(self, info, timeout=5)
(Constructor)

 

Connects to the admin interface.

Parameters:
  • info - Dictionary containing login info. For usage in the GIP, it is advised to create an Admin interface by using gip_storage.connect_admin, not through the constructor directly.
  • timeout - Timeout (in seconds) before the class will give up on the connection and raise an error.

cd(self, cell)

 

Change to a different cell. This will be called automatically by execute when it is necessary.

execute(self, cell, command, args=[])

 

Execute a command in the admin interface

Parameters:
  • cell - Cell name to send the command to.
  • command - Command name
  • args (List) - Any additional arguments to pass to dCache
Returns:
String containing command output.