Allow CLI commands to add presentation functions to control how
field values are displayed in CLI tables.

Use this to display the logical device datapath_id in hex
as opposed to dec.

Change-Id: Iac45fb75f7bd4c468c53c4bc769cc24c1e8478ef
diff --git a/cli/main.py b/cli/main.py
index 218d384..441b292 100755
--- a/cli/main.py
+++ b/cli/main.py
@@ -206,8 +206,11 @@
             'desc.serial_number',
             'switch_features.capabilities'
         }
+        presfns = {
+            'datapath_id': lambda x: "{0:0{1}x}".format(int(x), 16)
+        }
         print_pb_list_as_table('Logical devices:', res.items, omit_fields,
-                               self.poutput)
+                               self.poutput, presfns=presfns)
 
     def do_device(self, line):
         """Enter device level command mode"""