aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2022-06-24 10:32:28 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2022-06-28 11:36:18 +0000
commitb33b1461fe815b1a09267118644538a5b9351c60 (patch)
treeac8f7de8840a06df4867559b355e477a9fe42821 /resources/libraries
parente076cc8c47e7c10a48d0c5410967cd0269b98723 (diff)
feat(telemetry): Rework
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I0a84ce88b318c488ba2d519b20237c88b9f9f1e6
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/Constants.py9
-rw-r--r--resources/libraries/python/ContainerUtils.py9
-rw-r--r--resources/libraries/python/TelemetryUtil.py4
-rw-r--r--resources/libraries/python/VPPUtil.py4
-rw-r--r--resources/libraries/python/topology.py4
-rw-r--r--resources/libraries/robot/performance/performance_actions.robot8
6 files changed, 26 insertions, 12 deletions
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index 83e0854a6b..566dec7421 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -246,6 +246,12 @@ class Constants:
# Default path to VPP API socket.
SOCKSVR_PATH = u"/run/vpp/api.sock"
+ # Default path to VPP CLI socket.
+ SOCKCLI_PATH = u"/run/vpp/cli.sock"
+
+ # Default path to VPP API Stats socket.
+ SOCKSTAT_PATH = u"/run/vpp/stats.sock"
+
# Number of trials to execute in MRR test.
PERF_TRIAL_MULTIPLICITY = get_int_from_env(u"PERF_TRIAL_MULTIPLICITY", 10)
@@ -287,9 +293,6 @@ class Constants:
# /tmp directory is inside the DUT1 docker.
DUT1_UUID = get_str_from_env(u"DUT1_UUID", u"")
- # Default path to VPP API Stats socket.
- SOCKSTAT_PATH = u"/run/vpp/stats.sock"
-
# Global "kill switch" for CRC checking during runtime.
FAIL_ON_CRC_MISMATCH = get_pessimistic_bool_from_env(
u"FAIL_ON_CRC_MISMATCH"
diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py
index 633144e35f..7ec8258686 100644
--- a/resources/libraries/python/ContainerUtils.py
+++ b/resources/libraries/python/ContainerUtils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -589,6 +589,12 @@ class ContainerEngine:
)
topo_instance.add_new_socket(
self.container.node,
+ SocketType.CLI,
+ self.container.name,
+ self.container.cli_socket,
+ )
+ topo_instance.add_new_socket(
+ self.container.node,
SocketType.PAPI,
self.container.name,
self.container.api_socket,
@@ -1277,6 +1283,7 @@ class Container:
path = f"/tmp/vpp_sockets/{value}"
self.__dict__[u"socket_dir"] = path
self.__dict__[u"api_socket"] = f"{path}/api.sock"
+ self.__dict__[u"cli_socket"] = f"{path}/cli.sock"
self.__dict__[u"stats_socket"] = f"{path}/stats.sock"
self.__dict__[attr] = value
else:
diff --git a/resources/libraries/python/TelemetryUtil.py b/resources/libraries/python/TelemetryUtil.py
index be2f4796b2..2d4bb096c6 100644
--- a/resources/libraries/python/TelemetryUtil.py
+++ b/resources/libraries/python/TelemetryUtil.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -133,7 +133,7 @@ class TelemetryUtil:
for node in nodes.values():
if node[u"type"] == NodeType.DUT:
try:
- for socket in node[u"sockets"][u"PAPI"].values():
+ for socket in node[u"sockets"][u"CLI"].values():
TelemetryUtil.run_telemetry(
node, profile=profile, hook=socket
)
diff --git a/resources/libraries/python/VPPUtil.py b/resources/libraries/python/VPPUtil.py
index 0d5dea57df..daeb568bda 100644
--- a/resources/libraries/python/VPPUtil.py
+++ b/resources/libraries/python/VPPUtil.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -73,6 +73,8 @@ class VPPUtil:
DUTSetup.restart_service(node, Constants.VPP_UNIT)
if node_key:
Topology.add_new_socket(
+ node, SocketType.CLI, node_key, Constants.SOCKCLI_PATH)
+ Topology.add_new_socket(
node, SocketType.PAPI, node_key, Constants.SOCKSVR_PATH)
Topology.add_new_socket(
node, SocketType.STATS, node_key, Constants.SOCKSTAT_PATH)
diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py
index fba2dcb189..454692807c 100644
--- a/resources/libraries/python/topology.py
+++ b/resources/libraries/python/topology.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -71,6 +71,8 @@ class SocketType:
PAPI = u"PAPI"
# VPP PAPI Stats (legacy option until stats are migrated to Socket PAPI)
STATS = u"STATS"
+ # VPP Socket CLI
+ CLI = u"CLI"
DICT__nodes = load_topo_from_yaml()
diff --git a/resources/libraries/robot/performance/performance_actions.robot b/resources/libraries/robot/performance/performance_actions.robot
index 98f53ae4e9..3235dfa868 100644
--- a/resources/libraries/robot/performance/performance_actions.robot
+++ b/resources/libraries/robot/performance/performance_actions.robot
@@ -94,7 +94,7 @@
| | ... | ramp_up_duration=${ramp_up_duration}
| | ... | ramp_up_rate=${ramp_up_rate}
| | Run Telemetry On All DUTs
-| | ... | ${nodes} | profile=vpp_runtime.yaml
+| | ... | ${nodes} | profile=vppctl_runtime.yaml
| | Stop traffic on tg
| Additional Statistics Action For vpp-runtime-iperf3
@@ -119,7 +119,7 @@
| | | ... | bind=${iperf_client_bind}
| | | ... | affinity=${iperf_client_affinity}
| | Run Telemetry On All DUTs
-| | ... | ${nodes} | profile=vpp_runtime.yaml
+| | ... | ${nodes} | profile=vppctl_runtime.yaml
| | iPerf Client Stop Remote Exec | ${nodes['${iperf_client_node}']} | ${pids}
| Additional Statistics Action For noop
@@ -133,7 +133,7 @@
| | ... | Additional Statistics Action for clear VPP statistics.
| |
| | Run Telemetry On All DUTs
-| | ... | ${nodes} | profile=vpp_clear_stats.yaml
+| | ... | ${nodes} | profile=vppctl_clear_stats.yaml
| Additional Statistics Action For vpp-enable-packettrace
| | [Documentation]
@@ -154,4 +154,4 @@
| | ... | Additional Statistics Action for show VPP statistics.
| |
| | Run Telemetry On All DUTs
-| | ... | ${nodes} | profile=vpp_show_stats.yaml
+| | ... | ${nodes} | profile=vppctl_show_stats.yaml