TokenAgent
TokenAgent
This agent inspect all elements, and resets their tokens if necessary.
The following options can be set for the TokenAgent.
TokenAgent
{
#Time between cycles in seconds
PollingTime = 3600
#hours to notify the owner of the token in advance to the token expiration
notifyHours = 12
# admin e-mail to where to notify about expiring tokens (on top of existing notifications to tokwn owners)
adminMail =
}
- class DIRAC.ResourceStatusSystem.Agent.TokenAgent.TokenAgent(*args, **kwargs)
Bases:
AgentModule
TokenAgent is in charge of checking tokens assigned on resources. Notifications are sent to those users owning expiring tokens.
- __init__(*args, **kwargs)
c’tor
- am_Enabled()
- am_checkStopAgentFile()
- am_createStopAgentFile()
- am_getControlDirectory()
- am_getCyclesDone()
- am_getMaxCycles()
- am_getModuleParam(optionName)
- am_getOption(optionName, defaultValue=None)
Gets an option from the agent’s configuration section. The section will be a subsection of the /Systems section in the CS.
- am_getPollingTime()
- am_getShifterProxyLocation()
- am_getStopAgentFile()
- am_getWatchdogTime()
- am_getWorkDirectory()
- am_go()
- am_initialize(*initArgs)
Common initialization for all the agents.
This is executed every time an agent (re)starts. This is called by the AgentReactor, should not be overridden.
- am_removeStopAgentFile()
- am_secureCall(functor, args=(), name=False)
- am_setModuleParam(optionName, value)
- am_setOption(optionName, value)
- am_stopExecution()
- beginExecution()
- endExecution()
- execute()
Looks for user tokens. If they are expired, or expiring, it notifies users.
- finalize()
- initialize()
TokenAgent initialization