aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VppConfigGenerator.py
diff options
context:
space:
mode:
authorLudovit Mikula <ludovit.mikula@pantheon.tech>2019-07-17 14:36:21 +0000
committerPeter Mikus <pmikus@cisco.com>2019-12-11 08:54:36 +0000
commit3d5a75be5a88931690898e0fe52e4f48bc67c5ed (patch)
tree85b96f1e8e41d20dfd2a96f43689997dc632f78a /resources/libraries/python/VppConfigGenerator.py
parentf99c79a4035787aff0db70498d022095caa44043 (diff)
Introduce VPP-IPsec container tests.
Change-Id: Ie64d662e81879bd52785e0188450d998bf056bda Signed-off-by: Ludovit Mikula <ludovit.mikula@pantheon.tech>
Diffstat (limited to 'resources/libraries/python/VppConfigGenerator.py')
-rw-r--r--resources/libraries/python/VppConfigGenerator.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py
index 88fbb317c4..02f7cf725d 100644
--- a/resources/libraries/python/VppConfigGenerator.py
+++ b/resources/libraries/python/VppConfigGenerator.py
@@ -55,8 +55,8 @@ class VppConfigGenerator:
"""Initialize library."""
# VPP Node to apply configuration on
self._node = u""
- # VPP Hostname
- self._hostname = u""
+ # Topology node key
+ self._node_key = u""
# VPP Configuration
self._nodeconfig = dict()
# Serialized VPP Configuration
@@ -70,11 +70,13 @@ class VppConfigGenerator:
# VPP Startup config backup location
self._vpp_startup_conf_backup = None
- def set_node(self, node):
+ def set_node(self, node, node_key=None):
"""Set DUT node.
:param node: Node to store configuration on.
+ :param node_key: Topology node key.
:type node: dict
+ :type node_key: str
:raises RuntimeError: If Node type is not DUT.
"""
if node[u"type"] != NodeType.DUT:
@@ -82,7 +84,7 @@ class VppConfigGenerator:
u"Startup config can only be applied to DUTnode."
)
self._node = node
- self._hostname = Topology.get_node_hostname(node)
+ self._node_key = node_key
def set_vpp_logfile(self, logfile):
"""Set VPP logfile location.
@@ -612,7 +614,7 @@ class VppConfigGenerator:
"""
self.write_config(filename=filename)
- VPPUtil.restart_vpp_service(self._node)
+ VPPUtil.restart_vpp_service(self._node, self._node_key)
if verify_vpp:
VPPUtil.verify_vpp(self._node)