config moved to yaml, redundant config removed
diff --git a/config.py b/config.py
index b877bb3..3db7547 100644
--- a/config.py
+++ b/config.py
@@ -1,19 +1,17 @@
+import yaml
import os
-basedir = os.environ.get('DATABASE_FOLDER', os.path.abspath(os.path.dirname(__file__)))
-DOCUMENT_ID = "1Xvd0aHA7mr-_b5C3b-sQ66BQsJiOGIT2UesP7kG26oU"
-SHEET_NAME = "aaa"
-WORK_SHEET = "Worksheet"
-COL_COUNT = 2
-ROW_COUNT = 10
-DEFAULT_FILE_PATH = "test.json"
-OUTPUT_FILE = "output.json"
-TEST_PATH = os.environ.get("TEST_PATH", os.path.dirname(__file__) + "/test_results")
-CHARTS_IMG_PATH = "static/images"
-SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
-if os.environ.get('DATABASE_URL') is None:
- DATABASE_URI = ('sqlite:///' + os.path.join(basedir, 'app.db') +
- '?check_same_thread=False')
-else:
- DATABASE_URI = os.environ['DATABASE_URL']
\ No newline at end of file
+def parse_config(file_name):
+ with open(file_name) as f:
+ cfg = yaml.load(f.read())
+
+ return cfg
+
+
+cfg_dict = parse_config(os.path.join(os.path.dirname(__file__), 'config.yaml'))
+basedir = cfg_dict['paths']['basedir']
+TEST_PATH = cfg_dict['paths']['TEST_PATH']
+SQLALCHEMY_MIGRATE_REPO = cfg_dict['paths']['SQLALCHEMY_MIGRATE_REPO']
+DATABASE_URI = cfg_dict['paths']['DATABASE_URI']
+CHARTS_IMG_PATH = cfg_dict['paths']['CHARTS_IMG_PATH']
\ No newline at end of file
diff --git a/config.yaml b/config.yaml
new file mode 100644
index 0000000..1d67d3a
--- /dev/null
+++ b/config.yaml
@@ -0,0 +1,40 @@
+# nodes to be started/detected
+cluster:
+ - start_vm_OS:
+ # запустить по одной vm на каждую компьюту в опенстеке
+ creds: openrc-perf1
+ count: x1
+ image: ubuntu-test
+ flavor: ceph-test-io
+
+ - find_ceph_nodes
+ - find_openstack_nodes
+ - add:
+ - ssh://10.33.14.67, iscsi
+
+# sensors to be installed, accordingli to role
+sensors:
+ ceph-osd: ceph-io, ceph-cpu, ceph-ram, ceph-net
+ ceph-mon: ceph-io, ceph-cpu, ceph-ram, ceph-net
+ os-compute: io, net
+ test-vm: io, net
+
+# tests to run
+tests:
+ - io:
+ tool: iozone
+ opts_file: io_opts_file.txt
+ - pgbench
+ - rados-bench:
+ sizes: 4k, 16k, 1m
+
+# where to store results
+results:
+ - mos-linux-http://172.12.33.45
+
+paths:
+ basedir: "/home/gstepanov/rally-results-processor"
+ TEST_PATH: "/home/gstepanov/rally-results-processor/test_results"
+ CHARTS_IMG_PATH: "static/images"
+ SQLALCHEMY_MIGRATE_REPO: "/home/gstepanov/rally-results-processor/db_repository"
+ DATABASE_URI: 'sqlite:////home/gstepanov/rally-results-processor/app.db?check_same_thread=False'
\ No newline at end of file
diff --git a/parse_config.py b/parse_config.py
new file mode 100644
index 0000000..fd40910
--- /dev/null
+++ b/parse_config.py
@@ -0,0 +1,4 @@
+
+
+
+