aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python')
-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
5 files changed, 22 insertions, 8 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()