X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;h=1c1ada8f6c300835d0386c23bfd141c8cb9e92cf;hp=94250fba28f5bde058bc1d25671a6909ff626059;hb=95bf11e637855dc91e490f526406fa7538a21ac6;hpb=c2f8b62e978c4f5f29fa3ad3ccba6683a9f3ea85 diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index 94250fba28..1c1ada8f6c 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -528,6 +528,21 @@ class InterfaceUtil(object): return {} return response[0] + @staticmethod + def vhost_user_dump(node): + """Get vhost-user data for the given node. + + :param node: VPP node to get interface data from. + :type node: dict + :return: List of dictionaries with all vhost-user interfaces. + :rtype: list + """ + with VatTerminal(node) as vat: + response = vat.vat_terminal_exec_cmd_from_template( + "vhost_user_dump.vat") + + return response[0] + @staticmethod def create_subinterface(node, interface, sub_id, outer_vlan_id, inner_vlan_id, type_subif):