Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Introduce VPP-IPsec container tests.
[csit.git]
/
resources
/
libraries
/
python
/
VppConfigGenerator.py
diff --git
a/resources/libraries/python/VppConfigGenerator.py
b/resources/libraries/python/VppConfigGenerator.py
index
88fbb31
..
02f7cf7
100644
(file)
--- 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""
"""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
# 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
# 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.
"""Set DUT node.
:param node: Node to store configuration on.
+ :param node_key: Topology node key.
:type node: dict
:type node: dict
+ :type node_key: str
:raises RuntimeError: If Node type is not DUT.
"""
if node[u"type"] != NodeType.DUT:
: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
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.
def set_vpp_logfile(self, logfile):
"""Set VPP logfile location.
@@
-612,7
+614,7
@@
class VppConfigGenerator:
"""
self.write_config(filename=filename)
"""
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)
if verify_vpp:
VPPUtil.verify_vpp(self._node)