Package pyGlobus :: Module myProxy :: Class MyProxy
[show private | hide private]
[frames | no frames]

Class MyProxy


Method Summary
  __init__(self)
Initializes the memory for the underlying structures
  __del__(self)
Frees the memory associated with underlying structures
  create_proxy(self, proxyFile, hostname, port, lifetime)
Create a proxy and send it to the myproxy server
  destroy_proxy(self, hostname, port, dnAsUsername)
Destroys about proxy from the myproxy repository
  get_delegation(self, hostname, port, certfile, outFile, lifetime, interactive)
Gets the credential from the myproxy repository
  get_info(self, hostname, port, dnAsUsername)
Gets information about proxy from the myproxy repository
  set_passphrase(self, passphrase)
Sets the passphrase.
  set_username(self, username)
Sets the username

Method Details

__init__(self)
(Constructor)

Initializes the memory for the underlying structures
Returns:
None
Raises:
MyProxyException - A MyProxyException is raised if there is a problem initializing the underlying structures

__del__(self)
(Destructor)

Frees the memory associated with underlying structures

create_proxy(self, proxyFile, hostname, port=7512, lifetime=43200)

Create a proxy and send it to the myproxy server
Parameters:
hostname - a string of the hostname of the myproxy server
port - an int of the port the myproxy server is listening on
lifetime - an int which is the number of seconds the credential is valid
Returns:
None
Raises:
MyProxyException - A MyProxyException is raised if there is a problem creating the proxy

destroy_proxy(self, hostname, port=7512, dnAsUsername=None)

Destroys about proxy from the myproxy repository
Parameters:
hostname - a string which is the hostname of the repository
port - an int which is the port the repository is listening on
dnAsUsername - The DN of the proxy whom you want to query the server about
Returns:
None
Raises:
MyProxyException - A MyProxyException is raised if there is a problem getting the credential

get_delegation(self, hostname, port=7512, certfile=None, outFile=None, lifetime=43200, interactive=True)

Gets the credential from the myproxy repository
Parameters:
hostname - a string which is the hostname of the repository
port - an int which is the port the repository is listening on
certfile - the location of the certfile
outFile - a string which is the file where the credential will be written to
lifetime - an int which is the number of seconds the credential is valid
interactive - a bool which determines whether the password will be read in interactively.
Returns:
None
Raises:
MyProxyException - A MyProxyException is raised if there is a problem getting the credential

get_info(self, hostname, port=7512, dnAsUsername=None)

Gets information about proxy from the myproxy repository
Parameters:
hostname - a string which is the hostname of the repository
port - an int which is the port the repository is listening on
dnAsUsername - The DN of the proxy whom you want to query the server about
Returns:
A dictionary of the proxy information
Raises:
MyProxyException - A MyProxyException is raised if there is a problem getting the credential

set_passphrase(self, passphrase)

Sets the passphrase.
Parameters:
passphrase - A string of the passphrase that is set into the underlying myproxy request. The passphrase is not encrypted.
Raises:
MyProxyException - A MyProxyException is raised if the passphrase is too long or is not a Python String object

set_username(self, username)

Sets the username
Parameters:
username - a string of the username for the delegated proxy, defaults to $LOGNAME

Generated by Epydoc 2.1 on Tue Apr 4 14:32:54 2006 http://epydoc.sf.net