Skip to content

Commit

Permalink
docs (SE): revamp StorageElement docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Aug 15, 2022
1 parent e87c4a6 commit 6240c8d
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 106 deletions.
5 changes: 5 additions & 0 deletions dirac.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,11 @@ Resources
StorageElementGroups
{
CERN-Storages = CERN-DST-EOS, CERN-USER
# Default SEs to be used when uploading output data from Payloads
SE-USER = CERN-USER
# Default SEs to be used as failover SEs uploading output data from Payloads.
# This option is used in the Job Wrapper and, if set, requires the RequestManagementSystem to be installed
Tier1-Failover = CERN-FAILOVER,CNAF-FAILOVER
}
}
Operations
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ In this section all the physical resources than can be used by DIRAC users are d

FileCatalogs/index
Sites/index
StorageElements/index
StorageElementsGroups/index

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ DataManagement services are:
:maxdepth: 2

FileCatalog/index
StorageElement/index
StorageElementProxy/index

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ In this subsection are described the databases, services and URLs related with t

Databases/index
Services/index
URLs/index
2 changes: 1 addition & 1 deletion src/DIRAC/Resources/Storage/GFAL2_SRM2Storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self, storageName, parameters):
self.gfal2requestLifetime = gConfig.getValue("/Resources/StorageElements/RequestLifeTime", 100)

self.protocolsList = self.protocolParameters["OutputProtocols"]
self.log.debug("GFAL2_SRM2Storage: protocolsList = %s" % self.protocolsList)
self.log.debug(f"GFAL2_SRM2Storage: protocolsList = {self.protocolsList}")

self.__setSRMOptionsToDefault()

Expand Down
31 changes: 22 additions & 9 deletions src/DIRAC/Resources/Storage/StorageElement.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" This is the StorageElement class.
""" This is the StorageElement module. It implements The StorageElementItem as well as the caching system
"""
# # custom duty

Expand Down Expand Up @@ -41,6 +41,11 @@


class StorageElementCache(object):
"""
The StorageElementCache keeps StorageElementItem instances in a cache to save on initialization cost.
It keeps one instance per tuple (thread ID, seName, protocolSections, VO, proxy )
"""

def __init__(self):
self.seCache = DictCache()

Expand Down Expand Up @@ -77,18 +82,26 @@ def __call__(self, name, protocolSections=None, vo=None, hideExceptions=False):

class StorageElementItem(object):
"""
.. class:: StorageElement
.. class:: StorageElementItem
This class implements all the necessary logic to interact with the GRID storage Elements. Actual interaction with storages are delegated to ``StoragePlugins``.
The role of the StorageElementItem is to:
common interface to the grid storage element
* Provide a single interface to all the grid storages
* Ensure the status of the Storage in RSS
* Select multiple protocols for various operations
* Support multiple protocols as failover
* Negociate protocols with other StorageElement for Third Party Copy
self.name is the resolved name of the StorageElement i.e CERN-tape
self.options is dictionary containing the general options defined in the CS e.g. self.options['Backend] = 'Castor2'
self.storages is a dict of the stub objects created by StorageFactory for the protocols found in the CS. Index by the protocol section name.
self.localProtocolSections is a list of the local protocols that were created by StorageFactory
self.remoteProtocolSections is a list of the remote protocols that were created by StorageFactory
self.protocolOptions is a list of dictionaries containing the options found in the CS. (should be removed)
:ivar str name: Resolved name of the StorageElement
:ivar dict options: dictionary containing the general options defined in the CS
:ivar dict storages: dict of the stub objects created by StorageFactory for the protocols found in the CS. Index by the protocol section name.
:ivar list localProtocolSections: list of the local protocols that were created by StorageFactory
:ivar list remoteProtocolSections: list of the remote protocols that were created by StorageFactory
:ivar list protocolOptions: list of dictionaries containing the options found in the CS. (should be removed)
Expand Down

0 comments on commit 6240c8d

Please sign in to comment.