Skip to content

Commit

Permalink
fix: added deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Aug 27, 2024
1 parent 490a4e1 commit c1adfd5
Showing 1 changed file with 104 additions and 3 deletions.
107 changes: 104 additions & 3 deletions src/DIRAC/WorkloadManagementSystem/Service/WMSAdministratorHandler.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""
This is a DIRAC WMS administrator interface.
"""
from DIRAC import S_OK, S_ERROR

from DIRAC import S_ERROR, S_OK
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getSites
from DIRAC.Core.DISET.RequestHandler import RequestHandler
from DIRAC.Core.Utilities.Decorators import deprecated
from DIRAC.Core.Utilities.ObjectLoader import ObjectLoader
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getSites
from DIRAC.WorkloadManagementSystem.Client.PilotManagerClient import PilotManagerClient


Expand All @@ -32,6 +32,107 @@ def initializeHandler(cls, svcInfoDict):

return S_OK()

@deprecated("no-op RPC")
def export_setSiteMask(self, siteList):
"""Set the site mask for matching. The mask is given in a form of Classad string.
:param list siteList: site, status
:return: S_OK()/S_ERROR()
"""
return S_OK()

##############################################################################
types_getSiteMask = []

@classmethod
@deprecated("no-op RPC")
def export_getSiteMask(cls, siteState="Active"):
"""Get the site mask
:param str siteState: site status
:return: S_OK(list)/S_ERROR()
"""
return S_OK()

types_getSiteMaskStatus = []

@classmethod
@deprecated("no-op RPC")
def export_getSiteMaskStatus(cls, sites=None):
"""Get the site mask of given site(s) with columns 'site' and 'status' only
:param sites: list of sites or site
:type sites: list or str
:return: S_OK()/S_ERROR() -- S_OK contain dict or str
"""
return S_OK()

##############################################################################
types_getAllSiteMaskStatus = []

@classmethod
@deprecated("no-op RPC")
def export_getAllSiteMaskStatus(cls):
"""Get all the site parameters in the site mask
:return: dict
"""
return S_OK()

##############################################################################
types_banSite = [str]

@deprecated("no-op RPC")
def export_banSite(self, site, comment="No comment"):
"""Ban the given site in the site mask
:param str site: site
:param str comment: comment
:return: S_OK()/S_ERROR()
"""
return S_OK()

##############################################################################
types_allowSite = [str]

@deprecated("no-op RPC")
def export_allowSite(self, site, comment="No comment"):
"""Allow the given site in the site mask
:param str site: site
:param str comment: comment
:return: S_OK()/S_ERROR()
"""
return S_OK()

##############################################################################
types_clearMask = []

@classmethod
@deprecated("no-op RPC")
def export_clearMask(cls):
"""Clear up the entire site mask
:return: S_OK()/S_ERROR()
"""
return S_OK()

##############################################################################
types_getSiteMaskLogging = [[str, list]]

@classmethod
@deprecated("no-op RPC")
def export_getSiteMaskLogging(cls, sites):
"""Get the site mask logging history
:param list sites: sites
:return: S_OK(dict)/S_ERROR()
"""
return S_OK()

##############################################################################
types_getSiteMaskSummary = []

@classmethod
@deprecated("no-op RPC")
def export_getSiteMaskSummary(cls):
"""Get the mask status for all the configured sites
:return: S_OK(dict)/S_ERROR()
"""
return S_OK()

##############################################################################
types_getJobPilotOutput = [[str, int]]

Expand Down

0 comments on commit c1adfd5

Please sign in to comment.