[VOL-2282] Split out ofagent-py into it's own repo

Brought over from voltha-go commit: 006dc84ee1977cc47990439823c539ac258c34a1

Change-Id: I4355d33ddd8996d0be1a50263f270268c8b11533
diff --git a/ofagent/utils.py b/ofagent/utils.py
new file mode 100755
index 0000000..7e72bef
--- /dev/null
+++ b/ofagent/utils.py
@@ -0,0 +1,31 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# 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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""
+Common utility functions
+"""
+
+from loxi.pp import PrettyPrinter
+
+
+def pp(obj):
+    pp = PrettyPrinter(maxwidth=80)
+    pp.pp(obj)
+    return str(pp)
+
+def mac_str_to_tuple(mac):
+    """
+    Convert 'xx:xx:xx:xx:xx:xx' MAC address string to a tuple of integers.
+    Example: mac_str_to_tuple('00:01:02:03:04:05') == (0, 1, 2, 3, 4, 5)
+    """
+    return tuple(int(d, 16) for d in mac.split(':'))
\ No newline at end of file