"""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 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:
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.
"""
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)