Skip to content

Commit 314394a

Browse files
committed
feat: allow changing the InputDataPolicy in getInputDataCatalog
1 parent 4997855 commit 314394a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/DIRAC/Interfaces/API/Dirac.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def preSubmissionChecks(self, job, mode):
208208
return S_OK("Nothing to do")
209209

210210
#############################################################################
211-
def getInputDataCatalog(self, lfns, siteName="", fileName="pool_xml_catalog.xml", ignoreMissing=False):
211+
def getInputDataCatalog(self, lfns, siteName="", fileName="pool_xml_catalog.xml", ignoreMissing=False, inputDataPolicy=None):
212212
"""This utility will create a pool xml catalogue slice for the specified LFNs using
213213
the full input data resolution policy plugins for the VO.
214214
@@ -228,6 +228,10 @@ def getInputDataCatalog(self, lfns, siteName="", fileName="pool_xml_catalog.xml"
228228
:type siteName: string
229229
:param fileName: Catalogue name (can include path)
230230
:type fileName: string
231+
:param ignoreMissing: Flag to ignore missing files
232+
:type ignoreMissing: bool
233+
:param inputDataPolicy: Input data policy module to use
234+
:type inputDataPolicy: string or None
231235
:returns: S_OK,S_ERROR
232236
233237
"""
@@ -248,9 +252,10 @@ def getInputDataCatalog(self, lfns, siteName="", fileName="pool_xml_catalog.xml"
248252

249253
self.log.verbose(localSEList)
250254

251-
inputDataPolicy = Operations().getValue("InputDataPolicy/InputDataModule")
252255
if not inputDataPolicy:
253-
return self._errorReport("Could not retrieve /DIRAC/Operations/InputDataPolicy/InputDataModule for VO")
256+
inputDataPolicy = Operations().getValue("InputDataPolicy/InputDataModule")
257+
if not inputDataPolicy:
258+
return self._errorReport("Could not retrieve /DIRAC/Operations/InputDataPolicy/InputDataModule for VO")
254259

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

0 commit comments

Comments
 (0)