Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. """
  2. RucioFile File Catalog Client.
  3. """
  4.  
  5. from __future__ import division
  6.  
  7. import os
  8.  
  9. from DIRAC import S_OK, S_ERROR, gLogger
  10. from DIRAC.Resources.Catalog.Utilities import checkCatalogArguments
  11. from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getDNForUsername, getVOMSAttributeForGroup, \
  12. getVOForGroup, getVOOption
  13. from DIRAC.Resources.Catalog.FileCatalogClientBase import FileCatalogClientBase
  14.  
  15. LOG = gLogger.getSubLogger(__name__)
  16.  
  17. class RucioFileCatalogClient(FileCatalogClientBase):
  18. """
  19.  
  20. """
  21.  
  22. READ_METHODS = FileCatalogClientBase.READ_METHODS + ['listDirectory', 'getUserDirectory']
  23.  
  24.  
  25. WRITE_METHODS = FileCatalogClientBase.WRITE_METHODS + ['addFile']
  26.  
  27. NO_LFN_METHODS = FileCatalogClientBase.NO_LFN_METHODS + ['getUserDirectory', 'createUserDirectory',
  28. 'createUserMapping', 'removeUserDirectory']
  29.  
  30. ADMIN_METHODS = FileCatalogClientBase.ADMIN_METHODS + ['getUserDirectory']
  31.  
  32. def __init__( self, **options ):
  33. LOG.debug("Rucio File Catalog client created with options: ", options)
  34.  
  35. @checkCatalogArguments
  36. def listDirectory( self, lfns, verbose = False ):
  37. LOG.debug("Rucio list directory for lfns: ", lfns)
  38. if verbose:
  39. pass
  40. return S_OK({'Failed':[], 'Successful':[]})
  41.  
  42. @checkCatalogArguments
  43. def isFile(self, lfns, verbose=False):
  44. LOG.debug("Rucio isFile for lfns: ", lfns)
  45. if verbose:
  46. pass
  47. return S_OK({'Failed':[], 'Successful':[]})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement