aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-08-09 12:32:59 +0200
committerVratko Polak <vrpolak@cisco.com>2019-08-09 12:32:59 +0200
commita4c6a63b84f537b3ae660eab7d2a96ffb7740514 (patch)
treeecfa80bf2b0f3d2ef2955664fce8cd107242fa50 /resources/libraries
parent181e882d5c939cc6620545e5fde411e46fd59559 (diff)
Bump VPP stable version: socksvr
VPP changed the default socket path in: https://gerrit.fd.io/r/c/vpp/+/21100 Instead of "default", explicit value is used now. It coincides with VPP default one, and is stored in Constants.py (except documentation). The file name for robot side forwarded socket remains, as the path leading to is is different anyway. Change-Id: I0058d16794a3cd04411640c2c8d5fd4ee8cb997d Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/Constants.py3
-rw-r--r--resources/libraries/python/PapiExecutor.py2
-rw-r--r--resources/libraries/python/VppConfigGenerator.py7
3 files changed, 8 insertions, 4 deletions
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index d8550ab27a..0473ca2090 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -106,6 +106,9 @@ class Constants(object):
# Equivalent to ~0 used in vpp code
BITWISE_NON_ZERO = 0xffffffff
+ # Default path to VPP API socket.
+ SOCKSVR_PATH = "/run/vpp/api.sock"
+
# Mapping from NIC name to its bps limit.
# TODO: Implement logic to lower limits to TG NIC or software. Or PCI.
NIC_NAME_TO_LIMIT = {
diff --git a/resources/libraries/python/PapiExecutor.py b/resources/libraries/python/PapiExecutor.py
index 0e94fa61f5..8e59eff510 100644
--- a/resources/libraries/python/PapiExecutor.py
+++ b/resources/libraries/python/PapiExecutor.py
@@ -132,7 +132,7 @@ class PapiSocketExecutor(object):
api_json_directory = None
crc_checker_instance = None
- def __init__(self, node, remote_vpp_socket="/run/vpp-api.sock"):
+ def __init__(self, node, remote_vpp_socket=Constants.SOCKSVR_PATH):
"""Store the given arguments, declare managed variables.
:param node: Node to connect to and forward unix domain socket from.
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py
index 7ee3e2ceb0..15e8ffb3b5 100644
--- a/resources/libraries/python/VppConfigGenerator.py
+++ b/resources/libraries/python/VppConfigGenerator.py
@@ -20,6 +20,7 @@ in 7 various places of CSIT code.
import re
+from resources.libraries.python.Constants import Constants
from resources.libraries.python.ssh import exec_cmd_no_error
from resources.libraries.python.topology import NodeType
from resources.libraries.python.topology import Topology
@@ -196,10 +197,10 @@ class VppConfigGenerator(object):
path = ['unix', 'exec']
self.add_config_item(self._nodeconfig, value, path)
- def add_socksvr(self, socket="default"):
+ def add_socksvr(self, socket=Constants.SOCKSVR_PATH):
"""Add socksvr configuration."""
- path = ['socksvr', socket]
- self.add_config_item(self._nodeconfig, '', path)
+ path = ['socksvr', 'socket-name']
+ self.add_config_item(self._nodeconfig, socket, path)
def add_api_segment_gid(self, value='vpp'):
"""Add API-SEGMENT gid configuration.