ProxyManagerClient
ProxyManagerClient has the function to “talk” to the ProxyManager service
(ProxyManagerHandler
).
This inherits the DIRAC base Client for direct execution of server functionality.
Client also contain caching of the requested proxy information.
- class DIRAC.FrameworkSystem.Client.ProxyManagerClient.ProxyManagerClient(*args, **kwargs)
Bases:
object
- __init__()
- clearCaches()
Clear caches
- deleteGeneratedProxyFile(chain)
Delete a file generated by a dump
- Parameters:
chain (X509Chain) – proxy as a chain
- Returns:
S_OK()
- deleteProxyBundle(idList)
delete a list of id’s
- downloadProxy(**kwargs)
Get a proxy Chain from the proxy management
- Parameters:
- Returns:
S_OK(X509Chain)/S_ERROR()
- downloadProxyToFile(userDN, userGroup, limited=False, requiredTimeLeft=1200, cacheTime=14400, filePath=None, proxyToConnect=None)
Get a proxy Chain from the proxy management and write it to file
- Parameters:
- Returns:
S_OK(X509Chain)/S_ERROR()
- downloadVOMSProxy(**kwargs)
Download a proxy if needed and transform it into a VOMS one
- Parameters:
userDN (str) – user DN
userGroup (str) – user group
limited (boolean) – if need limited proxy
requiredTimeLeft (int) – required proxy live time in a seconds
cacheTime (int) – store in a cache time in a seconds
requiredVOMSAttribute (str) – VOMS attr to add to the proxy
proxyToConnect (X509Chain) – proxy as a chain
- Returns:
S_OK(X509Chain)/S_ERROR()
- downloadVOMSProxyToFile(userDN, userGroup, limited=False, requiredTimeLeft=1200, cacheTime=14400, requiredVOMSAttribute=None, filePath=None, proxyToConnect=None)
Download a proxy if needed, transform it into a VOMS one and write it to file
- Parameters:
userDN (str) – user DN
userGroup (str) – user group
limited (boolean) – if need limited proxy
requiredTimeLeft (int) – required proxy live time in a seconds
cacheTime (int) – store in a cache time in a seconds
requiredVOMSAttribute (str) – VOMS attr to add to the proxy
filePath (str) – path to save proxy
proxyToConnect (X509Chain) – proxy as a chain
- Returns:
S_OK(X509Chain)/S_ERROR()
- dumpProxyToFile(chain, destinationFile=None, requiredTimeLeft=600)
Dump a proxy to a file. It’s cached so multiple calls won’t generate extra files
- getDBContents(condDict={}, sorting=[['UserDN', 'DESC']], start=0, limit=0)
Get the contents of the db
- Parameters:
condDict (dict) – search condition
- Returns:
S_OK(dict)/S_ERROR() – dict contain fields, record list, total records
- getPayloadProxyFromDIRACGroup(userDN, userGroup, requiredTimeLeft, proxyToConnect=None)
Download a payload proxy with VOMS extensions depending on the group
- getPilotProxyFromDIRACGroup(userDN, userGroup, requiredTimeLeft=43200, proxyToConnect=None)
Download a pilot proxy with VOMS extensions depending on the group
- getPilotProxyFromVOMSGroup(userDN, vomsAttr, requiredTimeLeft=43200, proxyToConnect=None)
Download a pilot proxy with VOMS extensions depending on the group
- getUploadedProxyLifeTime(DN)
Get the remaining seconds for an uploaded proxy
- Parameters:
DN (str) – user DN
- Returns:
S_OK(int)/S_ERROR()
- getUserProxiesInfo()
Get the user proxies uploaded info
- Returns:
S_OK(dict)/S_ERROR()
- getVOMSAttributes(chain)
Get the voms attributes for a chain
- Parameters:
chain (X509Chain) – proxy as a chain
- Returns:
S_OK(str)/S_ERROR()
- instance = <DIRAC.FrameworkSystem.Client.ProxyManagerClient.ProxyManagerClient object>
- renewProxy(proxyToBeRenewed=None, minLifeTime=3600, newProxyLifeTime=43200, proxyToConnect=None)
Renew a proxy using the ProxyManager