chirp::Client Class Reference

Python Client object. More...

Public Member Functions

def __init__
 Create a new chirp client.
def whoami
 Returns a string with identity of the client according to the server.
def listacl
 Returns a string with the ACL of the given directory.
def ls
 Returns a list with the names of the files in the path.
def stat
 Returns a Chirp.Stat object with information on path.
def put
 Copies local file/directory source to the chirp server as file/directory destination.
def get
 Copies server file/directory source to the local file/directory destination.
def rm
 Removes the given file or directory from the server.

Detailed Description

Python Client object.

This class is used to create a chirp client


Member Function Documentation

def chirp::Client::__init__ (   self,
  hostport,
  timeout = 60,
  authentication = None,
  tickets = None,
  debug = False 
)

Create a new chirp client.

Parameters:
self Reference to the current task object.
hostport The host:port of the server.
timeout The time to wait for a server response on every request.
authentication A list of prefered authentications. E.g., ['tickets', 'unix']
debug Generate client debug output.
def chirp::Client::whoami (   self,
  absolute_stop_time = None,
  timeout = None 
)

Returns a string with identity of the client according to the server.

Parameters:
self Reference to the current task object.
absolute_stop_time If given, maximum number of seconds since epoch to wait for a server response. (Overrides any timeout.)
timeout If given, maximum number of seconds to wait for a server response.
def chirp::Client::listacl (   self,
  path = '/',
  absolute_stop_time = None,
  timeout = None 
)

Returns a string with the ACL of the given directory.

Throws an IOError on error (no such directory).

Parameters:
self Reference to the current task object.
path Target directory.
absolute_stop_time If given, maximum number of seconds since epoch to wait for a server response. (Overrides any timeout.)
timeout If given, maximum number of seconds to wait for a server response.
def chirp::Client::ls (   self,
  path,
  absolute_stop_time = None,
  timeout = None 
)

Returns a list with the names of the files in the path.

Throws an IOError on error (no such directory).

Parameters:
self Reference to the current task object.
path Target file/directory.
absolute_stop_time If given, maximum number of seconds since epoch to wait for a server response. (Overrides any timeout.)
timeout If given, maximum number of seconds to wait for a server response.
def chirp::Client::stat (   self,
  path,
  absolute_stop_time = None,
  timeout = None 
)

Returns a Chirp.Stat object with information on path.

Throws an IOError on error (e.g., no such path or insufficient permissions).

Parameters:
self Reference to the current task object.
path Target file/directory.
absolute_stop_time If given, maximum number of seconds since epoch to wait for a server response. (Overrides any timeout.)
timeout If given, maximum number of seconds to wait for a server response.
def chirp::Client::put (   self,
  source,
  destination = None,
  absolute_stop_time = None,
  timeout = None 
)

Copies local file/directory source to the chirp server as file/directory destination.

If destination is not given, source name is used. Raises Chirp.TransferFailure on error.

Parameters:
self Reference to the current task object.
source A local file or directory.
destination File or directory name to use in the server (defaults to source).
absolute_stop_time If given, maximum number of seconds since epoch to wait for a server response. (Overrides any timeout.)
timeout If given, maximum number of seconds to wait for a server response.
def chirp::Client::get (   self,
  source,
  destination = None,
  absolute_stop_time = None,
  timeout = None 
)

Copies server file/directory source to the local file/directory destination.

If destination is not given, source name is used. Raises Chirp.TransferFailure on error.

Parameters:
self Reference to the current task object.
source A server file or directory.
destination File or directory name to be used locally (defaults to source).
absolute_stop_time If given, maximum number of seconds since epoch to wait for a server response. (Overrides any timeout.)
timeout If given, maximum number of seconds to wait for a server response.
def chirp::Client::rm (   self,
  path,
  absolute_stop_time = None,
  timeout = None 
)

Removes the given file or directory from the server.

Raises OSError on error.

Parameters:
self Reference to the current task object.
path Target file/directory.
absolute_stop_time If given, maximum number of seconds since epoch to wait for a server response. (Overrides any timeout.)
timeout If given, maximum number of seconds to wait for a server response.

The documentation for this class was generated from the following file:

Generated on 29 Jun 2015 for cctools by  doxygen 1.6.1