From 751a63680e77af62093d4d3505da37999bf3301c Mon Sep 17 00:00:00 2001 From: stedif <stefano.difrischia@inaf.it> Date: Tue, 19 Oct 2021 18:22:05 +0200 Subject: [PATCH] L2SS-398: get hdbpp libname method --- devices/toolkit/archiver.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/devices/toolkit/archiver.py b/devices/toolkit/archiver.py index 35012767a..e16fae507 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 -- GitLab