+ DUTSetup.verify_program_installed(node, u"vpp")
+
+ @staticmethod
+ def adjust_privileges(node):
+ """Adjust privileges to control VPP without sudo.
+
+ :param node: Topology node.
+ :type node: dict
+ """
+ cmd = u"chmod -R o+rwx /run/vpp"
+ exec_cmd_no_error(
+ node, cmd, sudo=True, message=u"Failed to adjust privileges!",
+ retries=120)
+
+ @staticmethod
+ def verify_vpp_started(node):
+ """Verify that VPP is started on the specified topology node.
+
+ :param node: Topology node.
+ :type node: dict
+ """
+ cmd = u"echo \"show ver\" | sudo socat - UNIX-CONNECT:/run/vpp/cli.sock"
+ exec_cmd_no_error(
+ node, cmd, sudo=False, message=u"VPP failed to start!", retries=120
+ )
+
+ cmd = u"vppctl show ver 2>&1 | fgrep -v \"Connection refused\" | " \
+ u"fgrep -v \"No such file or directory\""
+ exec_cmd_no_error(
+ node, cmd, sudo=True, message=u"VPP failed to start!", retries=120
+ )
+
+ @staticmethod
+ def verify_vpp(node):
+ """Verify that VPP is installed and started on the specified topology
+ node. Adjust privileges so user can connect without sudo.
+
+ :param node: Topology node.
+ :type node: dict
+ :raises RuntimeError: If VPP service fails to start.
+ """
+ DUTSetup.verify_program_installed(node, 'vpp')
+ try:
+ # Verify responsiveness of vppctl.
+ VPPUtil.verify_vpp_started(node)
+ # Adjust privileges.
+ VPPUtil.adjust_privileges(node)
+ # Verify responsiveness of PAPI.
+ VPPUtil.show_log(node)
+ VPPUtil.vpp_show_version(node)
+ finally:
+ DUTSetup.get_service_logs(node, Constants.VPP_UNIT)