CLI to aid integration and testing
Change-Id: If18f194e45a8fc090a6b7869bb6d81728397ec9b
diff --git a/cli/utils.py b/cli/utils.py
index 23fab7f..5e3b7dd 100644
--- a/cli/utils.py
+++ b/cli/utils.py
@@ -1,10 +1,17 @@
import os
import sys
import requests
+from google.protobuf.json_format import MessageToDict
from termcolor import cprint, colored
from os.path import join as pjoin
+def pb2dict(pb_msg):
+ d = MessageToDict(pb_msg, including_default_value_fields=1,
+ preserving_proto_field_name=1)
+ return d
+
+
def p_cookie(cookie):
cookie = str(cookie)
if len(cookie) > 8: