aboutsummaryrefslogtreecommitdiffstats
path: root/func/driver.py
diff options
context:
space:
mode:
Diffstat (limited to 'func/driver.py')
-rw-r--r--func/driver.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/func/driver.py b/func/driver.py
new file mode 100644
index 00000000..45ec3fa2
--- /dev/null
+++ b/func/driver.py
@@ -0,0 +1,29 @@
+##############################################################################
+# Copyright (c) 2015 Dell Inc and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+
+import os
+
+
+class Driver:
+
+ def __init__(self):
+ print "Class driver initialized\n"
+
+ def drive_bench(self, benchmark, roles):
+ result_dir = '$PWD/results'
+ benchmark_name = benchmark + '.yaml'
+ print roles
+ for k, v in roles:
+ print k
+ run_play = 'ansible-playbook -s $PWD/benchmarks/playbooks/{0} --extra-vars "Dest_dir={1} role={2}" -vvv'.format(
+ benchmark_name, result_dir, k)
+
+ status = os.system(run_play)