+ cmd = u"echo \"show pci\" | 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 pci 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
+ )
+
+ # Properly enable cards in case they were disabled. This will be
+ # followed in https://jira.fd.io/browse/VPP-1934.
+ cmd = u"for i in $(sudo vppctl sho int | grep Eth | cut -d' ' -f1); do"\
+ u" sudo vppctl set int sta $i up; done"
+ exec_cmd(node, cmd, sudo=False)
+
+ @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)