X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpapi%2Fvpp_papi_provider.py;h=c9a43447f95f4ebb69009484176b6f4cbb41cbf1;hp=bd333b1e87af4373dfd55ab5bd2c905aa56ffaf5;hb=0d65bbb9619720ecc6bca1529acfb3a5239d9719;hpb=33f1fd4e8066802d596c2e59387a384788c21315 diff --git a/resources/tools/papi/vpp_papi_provider.py b/resources/tools/papi/vpp_papi_provider.py index bd333b1e87..c9a43447f9 100755 --- a/resources/tools/papi/vpp_papi_provider.py +++ b/resources/tools/papi/vpp_papi_provider.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2020 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -226,7 +226,12 @@ def process_stats(args): reply = list() for path in json_data: - directory = stats.ls(path) + # The ls method can match multiple patterns, + # but we feed it one path at a time anyway, because the caller + # expect results in a list, one item per path. + # Most VPP versions understand a string is a single pattern, + # but some blindly iterate (as if it was a list of chars). + directory = stats.ls([path]) data = stats.dump(directory) reply.append(data)