Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
Username | Input | string | Mandatory | The username to log into the catalog. |
Password | Input | string | Mandatory | The password of the related username to use. |
FacilityName | Input | string | ISIS | Select a facility to log in to. Allowed values: [‘ISIS’, ‘HFIR’, ‘SNS’, ‘NCNR’, ‘LENS’, ‘ILL’, ‘SINQ’, ‘SmuS’, ‘LLB’, ‘MLZ’, ‘ANSTO’, ‘HZB’, ‘TEST_LIVE’] |
KeepSessionAlive | Input | boolean | True | Keeps the session of the catalog alive if login was successful. |
KeepAlive | Output | IAlgorithm | A handle to the KeepAlive algorithm instance that continues to keep the catalog alive after this algorithm completes. |
This algorithm authenticates the user’s credentials against a specific catalog facility. The catalog is determined from the facility chosen, and is obtained from the config file Facilities.xml.
Example - log a user into the catalog.
# Attempts to authenticate the user against the ISIS catalog.
# When logging into the catalog the session class is returned.
# This can then be used throughout to perform other ICAT routines.
session = CatalogLogin(username='SECRET',password='SECRET',Facility="ISIS")
# View the session ID for this catalog session.
print "The session ID is: " + session.getPropertyValue("Session")
Output:
The session ID is: b931877c-3cfb-460e-9e88-ed4257020477
Categories: Algorithms | DataHandling\Catalog