Skip to content
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

[v7r3] removals and deprecations #4937

Merged
merged 7 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,4 @@ Agents
| | :mod:`~DIRAC.WorkloadManagementSystem.Agent.StalledJobAgent` | | |
+ +---------------------------------------------------------------------------------------------------+---------------+-----------------------------------------------------------------------------------+
| | :mod:`~DIRAC.WorkloadManagementSystem.Agent.StatesAccountingAgent` | NO | |
+ +---------------------------------------------------------------------------------------------------+---------------+-----------------------------------------------------------------------------------+
| | :mod:`~DIRAC.WorkloadManagementSystem.Agent.StatesMonitoringAgent` | NO | |
+--------------------+---------------------------------------------------------------------------------------------------+---------------+-----------------------------------------------------------------------------------+
52 changes: 0 additions & 52 deletions src/DIRAC/ConfigurationSystem/Client/Utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from DIRAC.ConfigurationSystem.Client.PathFinder import getDatabaseSection
from DIRAC.Core.Utilities.Grid import getBdiiCEInfo
from DIRAC.Core.Utilities.SiteSEMapping import getSEHosts
from DIRAC.Core.Utilities.Decorators import deprecated
from DIRAC.DataManagementSystem.Utilities.DMSHelpers import DMSHelpers


Expand All @@ -42,37 +41,6 @@ def getGridVOs():
return S_OK(voNames)


@deprecated("Will disappear (see https://github.com/DIRACGrid/DIRAC/issues/3908)")
def getSEsFromCS(protocol='srm'):
""" Get all the SEs defined in the CS

:param str protocol: storage protocol

:return: S_OK(dict)/S_ERROR()
"""
knownSEs = {}
result = gConfig.getSections('/Resources/StorageElements')
if not result['OK']:
return result
ses = result['Value']
for se in ses:
seSection = '/Resources/StorageElements/%s' % se
result = gConfig.getSections(seSection)
if not result['OK']:
continue
accesses = result['Value']
for access in accesses:
seProtocol = gConfig.getValue(cfgPath(seSection, access, 'Protocol'), '')
if seProtocol.lower() == protocol.lower() or protocol == 'any':
host = gConfig.getValue(cfgPath(seSection, access, 'Host'), '')
knownSEs.setdefault(host, [])
knownSEs[host].append(se)
else:
continue

return S_OK(knownSEs)


def getGridCEs(vo, bdiiInfo=None, ceBlackList=None, hostURL=None, glue2=False):
""" Get all the CEs available for a given VO and having queues in Production state

Expand Down Expand Up @@ -353,26 +321,6 @@ def addToChangeSet(entry, changeSet):
return S_OK(changeSet)


@deprecated("Used nowhere")
def getDIRACSesForHostName(hostName):
""" returns the DIRAC SEs that share the same hostName

:param str hostName: host name, e.g. 'storm-fe-lhcb.cr.cnaf.infn.it'
:return: S_OK with list of DIRAC SE names, or S_ERROR
"""

seNames = DMSHelpers().getStorageElements()

resultDIRACSEs = []
for seName in seNames:
res = getSEHosts(seName)
if not res['OK']:
return res
if hostName in res['Value']:
resultDIRACSEs.extend(seName)

return S_OK(resultDIRACSEs)

def getDBParameters(fullname):
""" Retrieve Database parameters from CS

Expand Down
1 change: 0 additions & 1 deletion src/DIRAC/ConfigurationSystem/test/Test_agentOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
'StalledJobsTolerantSites',
'Enable']}),
('DIRAC.WorkloadManagementSystem.Agent.StatesAccountingAgent', {}),
('DIRAC.WorkloadManagementSystem.Agent.StatesMonitoringAgent', {}),
('DIRAC.WorkloadManagementSystem.Agent.SiteDirector',
{'SpecialMocks': {'findGenericPilotCredentials': S_OK(('a', 'b'))}}),
]
Expand Down
18 changes: 0 additions & 18 deletions src/DIRAC/Core/scripts/dirac-agent.py

This file was deleted.

18 changes: 0 additions & 18 deletions src/DIRAC/Core/scripts/dirac-executor.py

This file was deleted.

16 changes: 0 additions & 16 deletions src/DIRAC/Core/scripts/dirac-service.py

This file was deleted.

1 change: 0 additions & 1 deletion src/DIRAC/Core/scripts/install_full.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ LocalInstallation
Agents += WorkloadManagement/JobCleaningAgent
Agents += WorkloadManagement/StalledJobAgent
Agents += WorkloadManagement/StatesAccountingAgent
Agents += WorkloadManagement/StatesMonitoringAgent
Agents += Configuration/Bdii2CSAgent
Agents += Configuration/VOMS2CSAgent
Agents += RequestManagement/RequestExecutingAgent
Expand Down
4 changes: 2 additions & 2 deletions src/DIRAC/FrameworkSystem/Client/NotificationClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, **kwargs):
self.setServer('Framework/Notification')

def sendMail(self, addresses, subject, body,
fromAddress=None, localAttempt=True, html=False, avoidSpam=False):
fromAddress=None, localAttempt=True, html=False):
""" Send an e-mail with subject and body to the specified address. Try to send
from local area before central service by default.
"""
Expand Down Expand Up @@ -59,7 +59,7 @@ def sendMail(self, addresses, subject, body,
'Could not send mail with the following message:\n%s\n will attempt to send via NotificationService' %
result['Message'])

result = self._getRPC().sendMail(address, subject, body, str(fromAddress), avoidSpam)
result = self._getRPC().sendMail(address, subject, body, str(fromAddress))
if not result['OK']:
self.log.error('Could not send mail via central Notification service', result['Message'])
return result
Expand Down
3 changes: 1 addition & 2 deletions src/DIRAC/FrameworkSystem/Service/NotificationHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ def initialize(self):
###########################################################################
types_sendMail = [six.string_types, six.string_types, six.string_types, six.string_types, bool]

def export_sendMail(self, address, subject, body, fromAddress, avoidSpam=False):
def export_sendMail(self, address, subject, body, fromAddress):
""" Send an email with supplied body to the specified address using the Mail utility.

:param six.string_types address: recipient addresses
:param six.string_types subject: subject of letter
:param six.string_types body: body of letter
:param six.string_types fromAddress: sender address, if None, will be used default from CS
:param bool avoidSpam: Deprecated

:return: S_OK(six.string_types)/S_ERROR() -- six.string_types is status message
"""
Expand Down
27 changes: 0 additions & 27 deletions src/DIRAC/Interfaces/API/Job.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
from DIRAC.Core.Workflow.Parameter import Parameter
from DIRAC.Core.Workflow.Workflow import Workflow
from DIRAC.Core.Utilities.ClassAd.ClassAdLight import ClassAd
from DIRAC.Core.Utilities.Decorators import deprecated
from DIRAC.Core.Utilities.Subprocess import systemCall
from DIRAC.Core.Utilities.List import uniqueElements
from DIRAC.Core.Utilities.ObjectLoader import ObjectLoader
Expand Down Expand Up @@ -881,32 +880,6 @@ def _getParameters(self):
wfParams[par.getName()] = par.getValue()
return wfParams

#############################################################################
@deprecated("Unused")
def _dumpParameters(self, showType=None):
"""Developer function.
Method to print the workflow parameters.
"""
paramsDict = {}
paramList = self.workflow.parameters
for param in paramList:
paramsDict[param.getName()] = {'type': param.getType(), 'value': param.getValue()}
self.log.info('--------------------------------------')
self.log.info('Workflow parameter summary: ')
self.log.info('--------------------------------------')
# print self.workflow.parameters
# print params.getParametersNames()
for name, _props in paramsDict.items():
ptype = paramsDict[name]['type']
value = paramsDict[name]['value']
if showType:
if ptype == showType:
self.log.info('NAME: %s\nTYPE: %s\nVALUE: %s ' % (name, ptype, value))
self.log.info('--------------------------------------')
else:
self.log.info('NAME: %s\nTYPE: %s\nVALUE: %s ' % (name, ptype, value))
self.log.info('--------------------------------------')

#############################################################################

def __setJobDefaults(self):
Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/MonitoringSystem/Client/Types/WMSHistory.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
""" Definition for WMSHistory Monitoring type.
Drop-in replacement for the Accounting/WMSHistory accounting type.

Filled by the agent "WorkloadManagement/StatesMonitoringAgent"
Filled by the agent "WorkloadManagement/StatesAccountingAgent"
"""
from __future__ import absolute_import
from __future__ import division
Expand Down
107 changes: 0 additions & 107 deletions src/DIRAC/WorkloadManagementSystem/Agent/StatesMonitoringAgent.py

This file was deleted.

7 changes: 0 additions & 7 deletions src/DIRAC/WorkloadManagementSystem/ConfigTemplate.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,6 @@ Agents
MessageQueue = dirac.wmshistory
}
##END
##BEGIN StatesMonitoringAgent
StatesMonitoringAgent
{
# the name of the message queue used for the failover
MessageQueue = dirac.wmshistory
}
##END
}
Executors
{
Expand Down
Loading