PyTest, test to cover VM creation a ovs nets
[osm/openvim.git] / test / lib / config_parser.py
diff --git a/test/lib/config_parser.py b/test/lib/config_parser.py
new file mode 100644 (file)
index 0000000..1981fce
--- /dev/null
@@ -0,0 +1,15 @@
+import yaml
+
+
+def get_config(file):
+    """
+    Parse test config file
+    :param file: 
+    :return: 
+    """
+    with open(file, 'r') as stream:
+        try:
+            return yaml.load(stream)
+        except yaml.YAMLError as exc:
+            print(exc)
+