-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #848 from dmwm/rucio_35
Merge Rucio 35
- Loading branch information
Showing
6 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
# | ||
# Eric Vaandering <[email protected]>, 2022 | ||
|
||
from CMSRucioPolicy.algorithms import lfn2pfn, auto_approve | ||
from CMSRucioPolicy.algorithms import lfn2pfn, auto_approve, pfn2lfn | ||
|
||
SUPPORTED_VERSION = ["32", "33", "34"] | ||
SUPPORTED_VERSION = ["32", "33", "34", "35"] | ||
|
||
|
||
def get_algorithms(): | ||
|
@@ -17,5 +17,8 @@ def get_algorithms(): | |
}, | ||
'auto_approve': { | ||
'global': auto_approve.global_approval, | ||
}, | ||
'pfn2lfn': { | ||
'cms_pfn2lfn': pfn2lfn.cms_pfn2lfn, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
PFN to scope:name translation algorithm for CMS Rucio policy | ||
""" | ||
from collections.abc import Mapping | ||
|
||
def cms_pfn2lfn(parsed_pfn: Mapping[str, str]) -> tuple[str, str]: | ||
""" | ||
This function converts a PFN into scope:name pair. | ||
It ignores user scopes and sets all scopes to cms. | ||
""" | ||
# Ignore user scopes for now | ||
scope = "cms" | ||
name = parsed_pfn['path'] + parsed_pfn['name'] | ||
return name, scope |