X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVhostUser.py;h=680d4ae3008ce52344ef846f3c4f862c27c852c9;hp=385d0f24ccb0a0c6734f3b9e915a66f10996b510;hb=d40746ab2134b0cedb2199685aab0ca8cea649cb;hpb=356fc1c76a96f50ca9caebd0ec7a023bf6d5f99b diff --git a/resources/libraries/python/VhostUser.py b/resources/libraries/python/VhostUser.py index 385d0f24cc..680d4ae300 100644 --- a/resources/libraries/python/VhostUser.py +++ b/resources/libraries/python/VhostUser.py @@ -14,6 +14,7 @@ """Vhost-user interfaces library.""" from resources.libraries.python.VatExecutor import VatExecutor, VatTerminal +from resources.libraries.python.topology import NodeType class VhostUser(object): @@ -86,3 +87,14 @@ class VhostUser(object): """ vat = VatExecutor() vat.execute_script("show_vhost.vat", node, json_out=False) + + @staticmethod + def show_vpp_vhost_on_all_duts(nodes): + """Show Vhost User on all DUTs. + + :param nodes: VPP nodes. + :type nodes: dict + """ + for node in nodes.values(): + if node['type'] == NodeType.DUT: + VhostUser.vpp_show_vhost(node)