Skip to content
Merged
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
13 changes: 10 additions & 3 deletions src/DIRAC/Interfaces/API/Dirac.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ def preSubmissionChecks(self, job, mode):
return S_OK("Nothing to do")

#############################################################################
def getInputDataCatalog(self, lfns, siteName="", fileName="pool_xml_catalog.xml", ignoreMissing=False):
def getInputDataCatalog(
self, lfns, siteName="", fileName="pool_xml_catalog.xml", ignoreMissing=False, inputDataPolicy=None
):
"""This utility will create a pool xml catalogue slice for the specified LFNs using
the full input data resolution policy plugins for the VO.

Expand All @@ -228,6 +230,10 @@ def getInputDataCatalog(self, lfns, siteName="", fileName="pool_xml_catalog.xml"
:type siteName: string
:param fileName: Catalogue name (can include path)
:type fileName: string
:param ignoreMissing: Flag to ignore missing files
:type ignoreMissing: bool
:param inputDataPolicy: Input data policy module to use
:type inputDataPolicy: string or None
:returns: S_OK,S_ERROR

"""
Expand All @@ -248,9 +254,10 @@ def getInputDataCatalog(self, lfns, siteName="", fileName="pool_xml_catalog.xml"

self.log.verbose(localSEList)

inputDataPolicy = Operations().getValue("InputDataPolicy/InputDataModule")
if not inputDataPolicy:
return self._errorReport("Could not retrieve /DIRAC/Operations/InputDataPolicy/InputDataModule for VO")
inputDataPolicy = Operations().getValue("InputDataPolicy/InputDataModule")
if not inputDataPolicy:
return self._errorReport("Could not retrieve /DIRAC/Operations/InputDataPolicy/InputDataModule for VO")

self.log.info(f"Attempting to resolve data for {siteName}")
self.log.verbose("%s" % ("\n".join(lfns)))
Expand Down
Loading