-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP][8.0]refactor gfal2 and storageElement #6127
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f6d7cab
feat (cfg): log config files loaded from DIRACSYSCONFIG
chaen 7673c9f
feat: remove defaultLocalProtocols, protocolLists = OutputProtocol, use
chaen f77cdd3
test (StorageFactory): convert to pytest
chaen f55575c
feat (StorageFactory): make explicit difference between pluginName an…
chaen 932bb4e
refactor (Storages): rename plugins in ProtocolSection where appropriate
chaen 05f347f
refactor (SE): getPlugins -> getProtocolSections. getStorageParameter…
chaen 5922729
refactor (SE): set protocolSectionName of Storage plugins in StorageF…
chaen 59deb96
refactor (SE): for the same protocol, favor the local plugin
chaen 6fa0041
refactor (SE): StorageElement plugins parameter becomes protocolSections
chaen a7ed196
refactor (SE): refresh comments
chaen c411829
refactor: move DMS GFAL test to pytest
chaen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -30,8 +30,13 @@ | |||||
class GFAL2_SRM2Storage(GFAL2_StorageBase): | ||||||
"""SRM2 SE class that inherits from GFAL2StorageBase""" | ||||||
|
||||||
_INPUT_PROTOCOLS = ["file", "root", "srm", "gsiftp"] | ||||||
_OUTPUT_PROTOCOLS = ["file", "root", "dcap", "gsidcap", "rfio", "srm", "gsiftp"] | ||||||
_INPUT_PROTOCOLS = [ | ||||||
"file", | ||||||
"gsiftp", | ||||||
"root", | ||||||
"srm", | ||||||
] | ||||||
_OUTPUT_PROTOCOLS = ["gsiftp", "root", "srm"] | ||||||
andresailer marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
def __init__(self, storageName, parameters): | ||||||
""" """ | ||||||
|
@@ -51,16 +56,10 @@ def __init__(self, storageName, parameters): | |||||
|
||||||
self.gfal2requestLifetime = gConfig.getValue("/Resources/StorageElements/RequestLifeTime", 100) | ||||||
|
||||||
self.__setSRMOptionsToDefault() | ||||||
self.protocolsList = self.protocolParameters["OutputProtocols"] | ||||||
self.log.debug("GFAL2_SRM2Storage: protocolsList = %s" % self.protocolsList) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
# This lists contains the list of protocols to ask to SRM to get a URL | ||||||
# It can be either defined in the plugin of the SE, or as a global option | ||||||
if "ProtocolsList" in parameters: | ||||||
self.protocolsList = parameters["ProtocolsList"].split(",") | ||||||
else: | ||||||
self.log.debug("GFAL2_SRM2Storage: No protocols provided, using the default protocols.") | ||||||
self.protocolsList = self.defaultLocalProtocols | ||||||
self.log.debug("GFAL2_SRM2Storage: protocolsList = %s" % self.protocolsList) | ||||||
self.__setSRMOptionsToDefault() | ||||||
|
||||||
def __setSRMOptionsToDefault(self): | ||||||
"""Resetting the SRM options back to default""" | ||||||
|
@@ -69,8 +68,8 @@ def __setSRMOptionsToDefault(self): | |||||
self.ctx.set_opt_string("SRM PLUGIN", "SPACETOKENDESC", self.spaceToken) | ||||||
self.ctx.set_opt_integer("SRM PLUGIN", "REQUEST_LIFETIME", self.gfal2requestLifetime) | ||||||
# Setting the TURL protocol to gsiftp because with other protocols we have authorisation problems | ||||||
# self.ctx.set_opt_string_list( "SRM PLUGIN", "TURL_PROTOCOLS", self.defaultLocalProtocols ) | ||||||
self.ctx.set_opt_string_list("SRM PLUGIN", "TURL_PROTOCOLS", ["gsiftp"]) | ||||||
self.ctx.set_opt_string_list("SRM PLUGIN", "TURL_PROTOCOLS", self.protocolsList) | ||||||
self.ctx.set_opt_string_list("SRM PLUGIN", "TURL_3RD_PARTY_PROTOCOLS", self.protocolsList) | ||||||
|
||||||
def _updateMetadataDict(self, metadataDict, attributeDict): | ||||||
"""Updating the metadata dictionary with srm specific attributes | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,8 +116,6 @@ def __init__(self, storageName, parameters): | |
self.stageTimeout = gConfig.getValue("/Resources/StorageElements/StageTimeout", 12 * 60 * 60) | ||
# gfal2Timeout, amount of time it takes until an operation times out | ||
self.gfal2Timeout = gConfig.getValue("/Resources/StorageElements/GFAL_Timeout", 100) | ||
# set the gfal2 default protocols, e.g. used when trying to retrieve transport url | ||
self.defaultLocalProtocols = gConfig.getValue("/Resources/StorageElements/DefaultProtocols", []) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is referenced also in the documentation, it should be removed from there too. |
||
|
||
# # set checksum type, by default this is 0 (GFAL_CKSM_NONE) | ||
self.checksumType = gConfig.getValue("/Resources/StorageElements/ChecksumType", "0") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.