__init__(self,
hostname=0,
password=0,
kerberos=False)
(Constructor)
| source code
|
Create a Connection object to be passed to other objects.
To connect to a specific Xgrid controller, create a Connection object
and then pass it to the Controller, Grid or Job objects you create. This
class performs no verification of the hostname or password.
Examples
Use the controller and password given in environmental vars.
>>> cn = Connection()
Specify a hostname and password.
>>> cn = Connection('xgrid.work.com','topsecret')
Use Kerberos.
>>> cn = Connection('xgrid.work.com',kerberos=True)
Usage
- Parameters:
hostname (string) - The hostname of the xgrid controller, like
"xgrid.work.com". If set to 0, it will default to the
value set in the environment variable XGRID_CONTROLLER_HOSTNAME
password (string) - The password of the xgrid controller, like "mysecret".
If set to 0, it will default to the value set in the environment
variable XGRID_CONTROLLER_PASSWORD. For no password, set it
equal to the empty string: password=''.
kerberos (boolean) - If True, connect using single sign on (SSO), instead of a
password. You must have already obtained a kerberos
ticket-granting ticket from the KDC that controlls the kerberos
domain containing the Xgrid controller. If kerberos is True, the
password is ignored.
- Overrides:
object.__init__
|