Skip to content

Commit 5ae6358

Browse files
committed
fix: removed getFreeDiskSpace and getTotalDiskSpace
1 parent 6b0e667 commit 5ae6358

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

src/DIRAC/WorkloadManagementSystem/Service/SandboxStoreHandler.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from DIRAC.Core.Security import Properties
2323
from DIRAC.Core.Utilities.File import getGlobbedTotalSize, mkDir
2424
from DIRAC.Core.Utilities.ObjectLoader import ObjectLoader
25-
from DIRAC.DataManagementSystem.Service.StorageElementHandler import getDiskSpace
2625
from DIRAC.FrameworkSystem.Utilities.diracx import TheImpersonator
2726

2827

@@ -210,7 +209,9 @@ def _getFromClient(self, fileId, token, fileSize, fileHelper=None, data=""):
210209

211210
sbURL = f"SB:{self.__localSEName}|{sbPath}"
212211
assignTo = {key: [(sbURL, assignTo[key])] for key in assignTo}
213-
if not (result := self.sandboxDB.assignSandboxesToEntities(assignTo, credDict["username"], credDict["group"]))["OK"]:
212+
if not (result := self.sandboxDB.assignSandboxesToEntities(assignTo, credDict["username"], credDict["group"]))[
213+
"OK"
214+
]:
214215
return result
215216
return S_OK(sbURL)
216217

@@ -349,26 +350,6 @@ def export_getSandboxesAssignedToEntity(self, entityId):
349350
sbDict[SBType].append(f"SB:{SEName}|{SEPFN}")
350351
return S_OK(sbDict)
351352

352-
##################
353-
# Disk space left management
354-
355-
types_getFreeDiskSpace = []
356-
357-
def export_getFreeDiskSpace(self):
358-
"""Get the free disk space of the storage element
359-
If no size is specified, terabytes will be used by default.
360-
"""
361-
362-
return getDiskSpace(self.getCSOption("BasePath", "/opt/dirac/storage/sandboxes"))
363-
364-
types_getTotalDiskSpace = []
365-
366-
def export_getTotalDiskSpace(self):
367-
"""Get the total disk space of the storage element
368-
If no size is specified, terabytes will be used by default.
369-
"""
370-
return getDiskSpace(self.getCSOption("BasePath", "/opt/dirac/storage/sandboxes"), total=True)
371-
372353
##################
373354
# Download sandboxes
374355

0 commit comments

Comments
 (0)