From 1e683eaf9cc1cb25133a4c0bf1612d20da874a5e Mon Sep 17 00:00:00 2001 From: aldbr Date: Thu, 19 Oct 2023 15:11:05 +0900 Subject: [PATCH] feat: replacing condition to submit pilots with tokens in multiVO setup --- src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py index 0c8d55fe660..76d4c1406d3 100644 --- a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py +++ b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py @@ -471,10 +471,10 @@ def submitPilots(self): def __supportToken(self, ce: ComputingElement) -> bool: """Check whether the SiteDirector is able to submit pilots with tokens. - * the CE is able to receive tokens. Validation: Tag = Token should be included in the CE parameters. - * the VO is able to produce tokens. Validation: IdProvider option is set in /Registry/VO//. + * 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: should be included in the CE parameters. """ - return "Token" in ce.ceParameters.get("Tag", []) and Registry.getIdPForGroup(self.pilotGroup) + 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): """Get the token corresponding to the pilot user identity