aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
diff options
context:
space:
mode:
authorOleksandr Naumets <oleksandrx.naumets@intel.com>2018-10-22 07:59:52 +0100
committerOleksandr Naumets <oleksandrx.naumets@intel.com>2018-11-05 12:16:25 +0000
commit283a5313d7f93ba967fe336ef6d883a1c1f4a52b (patch)
treef47d1fef49c3f2a099e8df8ea1643e32056f163c /yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
parente13f82dc70084480611bab5aa04ac126c0b1ff0e (diff)
Add API for PPPoE clients statistic retrieval
Add IxNextgen API for PPPoE clients per port statistics retrieval. JIRA: YARDSTICK-1480 Change-Id: Ic22cf4a085ad957891575e9728584aee939a6630 Signed-off-by: Oleksandr Naumets <oleksandrx.naumets@intel.com>
Diffstat (limited to 'yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py')
-rw-r--r--yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py41
1 files changed, 36 insertions, 5 deletions
diff --git a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
index 556682b29..631abec38 100644
--- a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
+++ b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
@@ -69,6 +69,7 @@ class IxNextgen(object): # pragma: no cover
PORT_STATS_NAME_MAP = {
"stat_name": 'Stat Name',
+ "port_name": 'Port Name',
"Frames_Tx": 'Frames Tx.',
"Valid_Frames_Rx": 'Valid Frames Rx.',
"Frames_Tx_Rate": 'Frames Tx. Rate',
@@ -85,6 +86,18 @@ class IxNextgen(object): # pragma: no cover
"Store-Forward_Max_latency_ns": 'Store-Forward Max Latency (ns)',
}
+ PPPOX_CLIENT_PER_PORT_NAME_MAP = {
+ 'subs_port': 'Port',
+ 'Sessions_Up': 'Sessions Up',
+ 'Sessions_Down': 'Sessions Down',
+ 'Sessions_Not_Started': 'Sessions Not Started',
+ 'Sessions_Total': 'Sessions Total'
+ }
+
+ PORT_STATISTICS = '::ixNet::OBJ-/statistics/view:"Port Statistics"'
+ FLOW_STATISTICS = '::ixNet::OBJ-/statistics/view:"Flow Statistics"'
+ PPPOX_CLIENT_PER_PORT = '::ixNet::OBJ-/statistics/view:"PPPoX Client Per Port"'
+
@staticmethod
def get_config(tg_cfg):
card = []
@@ -681,12 +694,30 @@ class IxNextgen(object): # pragma: no cover
:return: dictionary with the statistics; the keys of this dictionary
are PORT_STATS_NAME_MAP and LATENCY_NAME_MAP keys.
"""
- port_statistics = '::ixNet::OBJ-/statistics/view:"Port Statistics"'
- flow_statistics = '::ixNet::OBJ-/statistics/view:"Flow Statistics"'
- stats = self._build_stats_map(port_statistics,
+ stats = self._build_stats_map(self.PORT_STATISTICS,
+ self.PORT_STATS_NAME_MAP)
+ stats.update(self._build_stats_map(self.FLOW_STATISTICS,
+ self.LATENCY_NAME_MAP))
+ return stats
+
+ def get_pppoe_scenario_statistics(self):
+ """Retrieve port, flow and PPPoE subscribers statistics
+
+ "Port Statistics" parameters are stored in self.PORT_STATS_NAME_MAP.
+ "Flow Statistics" parameters are stored in self.LATENCY_NAME_MAP.
+ "PPPoX Client Per Port" parameters are stored in
+ self.PPPOE_CLIENT_PER_PORT_NAME_MAP
+
+ :return: dictionary with the statistics; the keys of this dictionary
+ are PORT_STATS_NAME_MAP, LATENCY_NAME_MAP and
+ PPPOE_CLIENT_PER_PORT_NAME_MAP keys.
+ """
+ stats = self._build_stats_map(self.PORT_STATISTICS,
self.PORT_STATS_NAME_MAP)
- stats.update(self._build_stats_map(flow_statistics,
- self.LATENCY_NAME_MAP))
+ stats.update(self._build_stats_map(self.FLOW_STATISTICS,
+ self.LATENCY_NAME_MAP))
+ stats.update(self._build_stats_map(self.PPPOX_CLIENT_PER_PORT,
+ self.PPPOX_CLIENT_PER_PORT_NAME_MAP))
return stats
def start_protocols(self):