summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dashboard/pushtoDB.py2
-rwxr-xr-xdata/qtip_creds.sh3
-rw-r--r--func/validate_yaml.py60
-rw-r--r--qtip.py46
-rw-r--r--requirements.txt8
-rw-r--r--test-requirements.txt5
-rw-r--r--tox.ini31
7 files changed, 97 insertions, 58 deletions
diff --git a/dashboard/pushtoDB.py b/dashboard/pushtoDB.py
index d2074534..173de239 100644
--- a/dashboard/pushtoDB.py
+++ b/dashboard/pushtoDB.py
@@ -2,7 +2,7 @@ import requests
import json
import datetime
import os
-TEST_DB = 'http://testresults.opnfv.org/testapi'
+TEST_DB = 'http://testresults.opnfv.org/test/api/v1'
suite_list = [('compute_result.json', 'compute_test_suite'),('network_result.json', 'network_test_suite'),('storage_result.json', 'storage_test_suite')]
payload_list = { }
diff --git a/data/qtip_creds.sh b/data/qtip_creds.sh
index bf316b4d..6f19305a 100755
--- a/data/qtip_creds.sh
+++ b/data/qtip_creds.sh
@@ -14,7 +14,8 @@ case "$INSTALLER_TYPE" in
PSWD="r00tme"
sshpass -p $PSWD scp $sshoptions ./data/QtipKey.pub root@$INSTALLER_IP:/root
sshpass -p $PSWD scp $sshoptions ./data/QtipKey root@$INSTALLER_IP:/root
- sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "ssh-copy-id $sshoptions -i /root/QtipKey.pub root@$DEST_IP && rm -rf /root/QtipKey && rm -rf /root/QtipKey.pub"
+ sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "grep -q '\-F /dev/null ' /usr/bin/ssh-copy-id || sed -i 's/\(ssh -i.*$\)/\1\n -F \/dev\/null \\\/g' `which ssh-copy-id`"
+ sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "ssh-copy-id $sshoptions -i /root/QtipKey root@$DEST_IP && rm -rf /root/QtipKey && rm -rf /root/QtipKey.pub"
;;
compass)
PSWD="root"
diff --git a/func/validate_yaml.py b/func/validate_yaml.py
index e4d3d5cf..fcf32a21 100644
--- a/func/validate_yaml.py
+++ b/func/validate_yaml.py
@@ -1,32 +1,28 @@
-##############################################################################
-# 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 yaml
-import os
-
-
-class Validate_Yaml():
-
- def __init__(self, doc):
-
- print 'Validating YAML CONFIG FILE'
-
- if not doc['Scenario']:
- print '\nScenario Field missing\n'
- if not doc['Scenario']['benchmark']:
- print '\nBenchmark field missing'
- if not doc['Scenario']['pointless']:
- print ''
- if not doc['Context']:
- print '\nEntire Context is missing'
- if not doc['Context']['Host_Machine']:
- print '\nNo Host Machine'
- if not doc['Context']['Host_Machine']['machine_1']
+##############################################################################
+# 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
+##############################################################################
+
+
+class Validate_Yaml(object):
+
+ def __init__(self, doc):
+
+ print('Validating YAML CONFIG FILE')
+
+ if not doc['Scenario']:
+ print('\nScenario Field missing\na')
+ if not doc['Scenario']['benchmark']:
+ print('\nBenchmark field missing')
+ if not doc['Scenario']['pointless']:
+ print('')
+ if not doc['Context']:
+ print('\nEntire Context is missing')
+ if not doc['Context']['Host_Machine']:
+ print('\nNo Host Machine')
+ if not doc['Context']['Host_Machine']['machine_1']:
+ print('\nNo Host Machine')
diff --git a/qtip.py b/qtip.py
index befbc23d..f95bb707 100644
--- a/qtip.py
+++ b/qtip.py
@@ -1,24 +1,22 @@
-##############################################################################
-# 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
-##############################################################################
-
-
-
-from func.cli import cli
-import os
-
-def main():
- os.system('./data/file_permission.sh')
- Objcli = cli()
-# os.system('cd data/ref_results && python compute_suite.py')
-# os.system('cd data/ref_results && python storage_suite.py')
-# os.system('cd data/ref_results && python network_suite.py')
-# os.system('cd data/report && python Qtip_Report.py')
-
-if __name__ == "__main__":
- main()
+##############################################################################
+# 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
+##############################################################################
+from func.cli import cli
+import os
+
+
+def main():
+ os.system('./data/file_permission.sh')
+ cli()
+# os.system('cd data/ref_results && python compute_suite.py')
+# os.system('cd data/ref_results && python storage_suite.py')
+# os.system('cd data/ref_results && python network_suite.py')
+# os.system('cd data/report && python Qtip_Report.py')
+
+if __name__ == "__main__":
+ main()
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 00000000..cc048389
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,8 @@
+pyyaml==3.10
+python-neutronclient==2.6.0
+python-novaclient==2.28.1
+python-glanceclient==1.1.0
+python-cinderclient==1.4.0
+python-heatclient==0.6.0
+python-keystoneclient==1.6.0
+reportlab==3.0
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 00000000..e4a0274b
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,5 @@
+# The order of packages is significant, because pip processes them in the order
+# of appearance. Changing the order has an impact on the overall integration
+# process, which may cause wedges in the gate later.
+
+pytest
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 00000000..3e5e1ef9
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,31 @@
+# Tox (http://tox.testrun.org/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py27
+skipsdist = True
+
+[testenv]
+changedir=tests
+deps =
+ -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+commands=
+ py.test \
+ --basetemp={envtmpdir} \ # py.test tempdir setting
+ {posargs} # substitute with tox' positional arguments
+
+[testenv:pep8]
+deps = flake8
+commands = flake8 {toxinidir}
+
+[flake8]
+# H803 skipped on purpose per list discussion.
+# E123, E125 skipped as they are invalid PEP-8.
+
+show-source = True
+ignore = E123,E125,H803
+builtins = _
+exclude=.venv,.git,.tox,dist,doc,build