enb,epc,ms: refactor KPI API

we previously mixed component specific and component agnostic APIs
(stdout vs. log file for example) for setting and retrieving KPI.

This patch propose to use a single abstract get_kpis() method for
all components that can be enriched with component-specific
stuff as desired.

In the case of srsLTE blocks, the main implementation will
remain in srslte_common() and is shared among srsENB/srsUE/srsEPC.

The KPI analyzer in srslte_common() extract and also manages
all three KPI sources (log, csv and stdout) independently.

In addition to the get_kpis() method that always returns a flat
dictionary, it also exposes get_kpi_tree() that return
a dict of KPI dicts that will be used for the Junit.xml generation.

Change-Id: I4bacc6b8a0cb92a581edfb947100b57022265265
diff --git a/src/osmo_gsm_tester/obj/enb_srs.py b/src/osmo_gsm_tester/obj/enb_srs.py
index aee3f61..83df5ed 100644
--- a/src/osmo_gsm_tester/obj/enb_srs.py
+++ b/src/osmo_gsm_tester/obj/enb_srs.py
@@ -101,7 +101,7 @@
                 self.log(repr(e))
 
         # Collect KPIs for each TC
-        self.testenv.test().set_kpis(self.get_kpis())
+        self.testenv.test().set_kpis(self.get_kpi_tree())
         # Clean up for parent class:
         super().cleanup()
 
@@ -267,6 +267,9 @@
             return self.process.get_counter_stdout('RACH:')
         raise log.Error('counter %s not implemented!' % counter_name)
 
+    def get_kpis(self):
+        return srslte_common.get_kpis(self)
+
     def get_rfemu(self, cell=0, dl=True):
         cell_list = self.gen_conf['enb'].get('cell_list', None)
         if cell_list is None or len(cell_list) < cell + 1: