Skip to content

Commit 922e7af

Browse files
committed
feat: added TornadoComponentMonitoringHandler
1 parent 85a8918 commit 922e7af

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

src/DIRAC/FrameworkSystem/ConfigTemplate.cfg

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,23 @@ Services
173173
getInstallations = authenticated
174174
updateLog = Operator
175175
}
176+
##BEGIN TornadoComponentMonitoring:
177+
# Section to describe ComponentMonitoring system
178+
TornadoComponentMonitoring
179+
{
180+
Authorization
181+
{
182+
Default = ServiceAdministrator
183+
componentExists = authenticated
184+
getComponents = authenticated
185+
hostExists = authenticated
186+
getHosts = authenticated
187+
installationExists = authenticated
188+
getInstallations = authenticated
189+
updateLog = Operator
190+
}
176191
}
192+
##END
177193
RabbitMQSync
178194
{
179195
Port = 9192

src/DIRAC/FrameworkSystem/Service/ComponentMonitoringHandler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from DIRAC.Core.DISET.RequestHandler import RequestHandler
1515

1616

17-
class ComponentMonitoringHandler(RequestHandler):
17+
class ComponentMonitoringHandlerMixin:
1818
@classmethod
1919
def initializeHandler(cls, serviceInfo):
2020
"""
@@ -330,3 +330,7 @@ def export_removeLogs(self, fields):
330330
return S_ERROR("Host does not exist")
331331

332332
return ComponentMonitoringHandler.db.removeLogs(fields)
333+
334+
335+
class ComponentMonitoringHandler(ComponentMonitoringHandlerMixin, RequestHandler):
336+
pass
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
""" TornadoComponentMonitoring is the implementation of the ComponentMonitoringent service in HTTPS
2+
3+
.. literalinclude:: ../ConfigTemplate.cfg
4+
:start-after: ##BEGIN TornadoComponentMonitoring:
5+
:end-before: ##END
6+
:dedent: 2
7+
:caption: TornadoComponentMonitoring options
8+
"""
9+
from DIRAC.Core.Tornado.Server.TornadoService import TornadoService
10+
from DIRAC.FrameworkSystem.Service.ComponentMonitoringHandler import ComponentMonitoringHandlerMixin
11+
12+
13+
class TornadoComponentMonitoringHandler(ComponentMonitoringHandlerMixin, TornadoService):
14+
pass

0 commit comments

Comments
 (0)