FIX: Update PAPI to work with string changes in Python API 07/16507/1
authorJan Gelety <jgelety@cisco.com>
Mon, 17 Dec 2018 08:56:43 +0000 (09:56 +0100)
committerJan Gelety <jgelety@cisco.com>
Mon, 17 Dec 2018 08:56:43 +0000 (09:56 +0100)
Change-Id: I3b5f0568b5928cf12aaf2a555f52dd9809348579
Signed-off-by: Jan Gelety <jgelety@cisco.com>
VPP_STABLE_VER_CENTOS
VPP_STABLE_VER_UBUNTU
resources/libraries/python/PapiExecutor.py
resources/tools/papi/vpp_papi_provider.py

index 3c2d46c..7895b56 100644 (file)
@@ -1 +1 @@
-19.01-rc0~457_g11312ef~b5746
\ No newline at end of file
+19.01-rc0~482_g884f0af~b5776
\ No newline at end of file
index 9e54d7f..0072a7f 100644 (file)
@@ -1 +1 @@
-19.01-rc0~457-g11312ef~b5933
\ No newline at end of file
+19.01-rc0~482-g884f0af~b5962
\ No newline at end of file
index 6a47b94..75bdde0 100644 (file)
@@ -95,9 +95,10 @@ class PapiExecutor(object):
         reply_value = dict()
         for reply_key, reply_v in api_r.iteritems():
             for a_k, a_v in reply_v.iteritems():
-                value = binascii.unhexlify(a_v) if isinstance(a_v, unicode) \
-                    else a_v
-                reply_value[a_k] = value
+                # value = binascii.unhexlify(a_v) if isinstance(a_v, unicode) \
+                #     else a_v
+                # reply_value[a_k] = value
+                reply_value[a_k] = a_v
             reply_dict[reply_key] = reply_value
         return reply_dict
 
index 0d93497..69b1968 100644 (file)
@@ -130,7 +130,7 @@ def convert_reply(api_r):
     """Process API reply / a part of API reply for smooth converting to
     JSON string.
 
-    Apply binascii.hexlify() method for string values.
+    Apply binascii.hexlify() method for string values.
     :param api_r: API reply.
     :type api_r: Vpp_serializer reply object (named tuple)
     :returns: Processed API reply / a part of API reply.
@@ -143,9 +143,10 @@ def convert_reply(api_r):
     reply_value = dict()
     for item in dir(api_r):
         if not item.startswith('_') and item not in unwanted_fields:
-            attr_value = getattr(api_r, item)
-            value = binascii.hexlify(attr_value) \
-                if isinstance(attr_value, str) else attr_value
+            # attr_value = getattr(api_r, item)
+            # value = binascii.hexlify(attr_value) \
+            #     if isinstance(attr_value, str) else attr_value
+            value = getattr(api_r, item)
             reply_value[item] = value
     reply_dict[reply_key] = reply_value
     return reply_dict

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.