update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b second try
[osm/SO.git] / rwlaunchpad / ra / pytest / ns / restapitest / utils / utils.py
diff --git a/rwlaunchpad/ra/pytest/ns/restapitest/utils/utils.py b/rwlaunchpad/ra/pytest/ns/restapitest/utils/utils.py
new file mode 100644 (file)
index 0000000..c664572
--- /dev/null
@@ -0,0 +1,28 @@
+
+from .imports import * # noqa
+
+
+def parse_cli():
+    """Parse command line options
+    """
+
+    parser = argparse.ArgumentParser()
+    parser.add_argument("--confd-host", help="confd IP",
+                        dest='confd_host',
+                        default='127.0.0.1')
+    args = parser.parse_args()
+
+    return args
+
+
+def parse_input_data(file_name):
+    """
+    open the input file and make into a python Dict Obj
+    """
+
+    data = ''
+
+    with open(file_name, 'r') as ipf:
+        data = json.load(ipf)
+
+    return data