Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0] better place to document token toggle #7685

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -469,11 +469,7 @@ def submitPilots(self):
return S_OK()

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 __getPilotToken(self, audience: str, scope: list[str] = None):
Expand Down
Loading