Skip to content

Commit

Permalink
Merge pull request #7688 from andresailer/cherry-pick-2-93ca76813-int…
Browse files Browse the repository at this point in the history
…egration

[sweep:integration] better place to document token toggle
  • Loading branch information
fstagni committed Jun 24, 2024
2 parents 0705e9a + 5e79967 commit 6654973
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/DIRAC/Resources/Computing/ComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
(the submission of a job is blocking the execution until its completion). It deals with one job at a time.
- Inner Pool ComputingElement: includes methods to locally interact with Inner ComputingElements asynchronously.
It can manage a pool of jobs running simultaneously.
To configure the use of Tokens for CEs:
* the CE is able to receive any token. Validation: 'Tag = Token' should be included in the CE parameters.
* the CE is able to receive VO-specifc tokens. Validation: 'Tag = Token:<VO>' should be included in the CE parameters.
"""

import os
Expand Down
6 changes: 1 addition & 5 deletions src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,11 +896,7 @@ def __getPilotToken(self, audience: str, scope: list[str] = None):
return gTokenManager.getToken(userGroup=pilotGroup, requiredTimeLeft=600, scope=scope, audience=audience)

def __supportToken(self, ce: ComputingElement) -> bool:
"""Check whether the SiteDirector is able to submit pilots with tokens.
* the CE is able to receive any token. Validation: Tag = Token should be included in the CE parameters.
* the CE is able to receive VO-specifc tokens. Validation: Tag = Token:<VO> should be included in the CE parameters.
"""
"""Check whether the SiteDirector is able to submit pilots with tokens."""
return "Token" in ce.ceParameters.get("Tag", []) or f"Token:{self.vo}" in ce.ceParameters.get("Tag", [])

def _setCredentials(self, ce: ComputingElement, proxyMinimumRequiredValidity: int):
Expand Down

0 comments on commit 6654973

Please sign in to comment.