Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 08:39:16

0001 # Licensed under the Apache License, Version 2.0 (the "License");
0002 # you may not use this file except in compliance with the License.
0003 # You may obtain a copy of the License at
0004 # http://www.apache.org/licenses/LICENSE-2.0
0005 #
0006 # Authors:
0007 # - Wen Guan, wen.guan@cern.ch, 2018
0008 
0009 ## THIS FILE IS DEPRECATED AND CAN BE REMOVED LATER (anisyonk)
0010 
0011 import logging
0012 logger = logging.getLogger(__name__)
0013 
0014 
0015 sched2ddm_activity_map = {'es_events': 'pw',
0016                           'es_failover': 'pw',
0017                           'es_events_read': 'pr'}
0018 
0019 
0020 def get_ddm_activity(activity):
0021     """
0022     Map schedconf activities to corresponding ddm activities
0023 
0024     :param activity: schedconf activity as string
0025     :return: ddm activity as string
0026     """
0027     if activity in sched2ddm_activity_map:
0028         ddm_activity = sched2ddm_activity_map[activity]
0029         logger.info("Schedconf activity %s is mapped to ddm activity: %s" % (activity, ddm_activity))
0030         return ddm_activity
0031     return activity