aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
diff options
context:
space:
mode:
authorAbhijit Sinha <abhijit.sinha@intel.com>2018-11-07 11:25:44 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-11-07 11:25:44 +0000
commitd4f4370bfe04dbf86024c69c1e7a0395ee62bff8 (patch)
treef7885dfcc708af323c211774392a35b93fce243a /yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
parent9756d02c8d72a178e7136b9fc8031f671d2b8d5e (diff)
parent283a5313d7f93ba967fe336ef6d883a1c1f4a52b (diff)
Merge "Add API for PPPoE clients statistic retrieval"
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):