X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVPPUtil.py;h=9d2a2b9dd331deca4727e69273a7b971ceb255ae;hb=refs%2Fchanges%2F93%2F15093%2F3;hp=de3caad916ae8cbd594f39cb5e27d905bc228bcb;hpb=5f7c2bc0f96747dcd37c59971a58f8b838ac2eb8;p=csit.git diff --git a/resources/libraries/python/VPPUtil.py b/resources/libraries/python/VPPUtil.py index de3caad916..9d2a2b9dd3 100644 --- a/resources/libraries/python/VPPUtil.py +++ b/resources/libraries/python/VPPUtil.py @@ -81,6 +81,15 @@ class VPPUtil(object): """ DUTSetup.stop_service(node, Constants.VPP_UNIT) + @staticmethod + def stop_vpp_service_on_all_duts(nodes): + """Stop VPP service on all nodes. + + :param nodes: Nodes in the topology. + :type nodes: dict + """ + DUTSetup.stop_service_on_all_duts(nodes, Constants.VPP_UNIT) + @staticmethod def verify_vpp_on_dut(node): """Verify that VPP is installed on DUT node. @@ -202,3 +211,46 @@ class VPPUtil(object): for node in nodes.values(): if node['type'] == NodeType.DUT: VPPUtil.vpp_enable_traces_on_dut(node) + + @staticmethod + def vpp_enable_elog_traces_on_dut(node): + """Enable API/CLI/Barrier traces on the DUT node. + + :param node: DUT node to set up. + :type node: dict + """ + vat = VatExecutor() + vat.execute_script("elog_trace_api_cli_barrier.vat", node, + json_out=False) + + @staticmethod + def vpp_enable_elog_traces_on_all_duts(nodes): + """Enable API/CLI/Barrier traces on all DUTs in the given topology. + + :param nodes: Nodes in the topology. + :type nodes: dict + """ + for node in nodes.values(): + if node['type'] == NodeType.DUT: + VPPUtil.vpp_enable_elog_traces_on_dut(node) + + @staticmethod + def show_event_logger_on_dut(node): + """Show event logger on the DUT node. + + :param node: DUT node to show traces on. + :type node: dict + """ + vat = VatExecutor() + vat.execute_script("show_event_logger.vat", node, json_out=False) + + @staticmethod + def show_event_logger_on_all_duts(nodes): + """Show event logger on all DUTs in the given topology. + + :param nodes: Nodes in the topology. + :type nodes: dict + """ + for node in nodes.values(): + if node['type'] == NodeType.DUT: + VPPUtil.show_event_logger_on_dut(node)