Skip to content

Commit

Permalink
Merge pull request #7708 from martynia/rel-v8r0_janusz_multiVO_matada…
Browse files Browse the repository at this point in the history
…taFix

[8.0] FIX  Multi VO metadata double VO suffix issue fix (#7697)
  • Loading branch information
andresailer authored Jul 3, 2024
2 parents eccfe88 + 621ec60 commit 96a985c
Showing 1 changed file with 23 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,17 @@ def setMetaParameter(self, dPath, metaName, metaValue, credDict):

def getDirectoryMetadata(self, path, credDict, inherited=True, ownData=True):
"""
Get metadata for the given directory aggregating metadata for the directory itself
and for all the parent directories if inherited flag is True. Get also the non-indexed
metadata parameters.
:param str path: directory path
:param dict credDict: client credential dictionary
:param bool inherited: include parent directories if True
:param bool ownData:
:return: standard Dirac result object + additional MetadataOwner \
and MetadataType dict entries if the operation is successful.
"""
Get metadata for the given directory aggregating metadata for the directory itself
and for all the parent directories if inherited flag is True. Get also the non-indexed
metadata parameters.
:param str path: directory path
:param dict credDict: client credential dictionary
:param bool inherited: include parent directories if True
:param bool ownData:
:return: standard Dirac result object + additional MetadataOwner \
and MetadataType dict entries if the operation is successful.
"""

result = super().getDirectoryMetadata(path, credDict, inherited, ownData)
if not result["OK"]:
Expand All @@ -181,9 +181,16 @@ def getDirectoryMetadata(self, path, credDict, inherited=True, ownData=True):

return result

def findDirIDsByMetadata(self, metaDict, dPath, credDict):
"""Find Directories satisfying the given metadata and being subdirectories of
the given path
def findDirectoriesByMetadata(self, queryDict, path, credDict):
"""
fMetaDict = _getMetaNameDict(metaDict, credDict)
return super().findDirIDsByMetadata(fMetaDict, dPath, credDict)
Find Directory names satisfying the given metadata and being subdirectories of
the given path.
:param dict queryDict: dictionary containing query data
:param str path: starting directory path
:param dict credDict: client credential dictionary
:return: S_OK/S_ERROR, Value list of selected directory paths
"""

fMetaDict = _getMetaNameDict(queryDict, credDict)
return super().findDirectoriesByMetadata(fMetaDict, path, credDict)

0 comments on commit 96a985c

Please sign in to comment.