diff --git a/devices/toolkit/archiver.py b/devices/toolkit/archiver.py index 35012767add234b2b0421b359bfacf19ca6b9155..e16fae507cb1e6e23afcaf8559874ab30005892c 100644 --- a/devices/toolkit/archiver.py +++ b/devices/toolkit/archiver.py @@ -66,6 +66,16 @@ class Archiver(): except Exception as e: raise Exception("Error in selecting configuration! Archiving framework will not be updated!") from e + def get_hdbpp_libname(self, device_name:str): + """ + Get the hdbpp library name used by the Configuration Manager or by the EventSubscribers + Useful in the case of different DBMS architectures (e.g. MySQL, TimescaleDB) + """ + device = DeviceProxy(device_name) + config_list = device.get_property('LibConfiguration')['LibConfiguration'] # dictionary {'LibConfiguration': list of strings} + libname = str([s for s in config_list if "libname" in s][0].split('=')[1]) + return libname + def apply_selector(self): """ Apply the customized strategy defined by the selector