Merge "Add jjb script for nfvbench to build the nfvbench VM"
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Fri, 11 Aug 2017 19:49:49 +0000 (19:49 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Fri, 11 Aug 2017 19:49:49 +0000 (19:49 +0000)
160 files changed:
jjb-sandbox/releng/releng-sandbox-jobs.yml
jjb/apex/apex.yml
jjb/apex/apex.yml.j2
jjb/apex/scenarios.yaml.hidden
jjb/apex/update-build-result.groovy
jjb/armband/armband-ci-jobs.yml
jjb/armband/armband-project-jobs.yml
jjb/bottlenecks/bottlenecks-ci-jobs.yml
jjb/bottlenecks/bottlenecks-run-suite.sh
jjb/ci_gate_security/anteater-report-to-gerrit.sh
jjb/ci_gate_security/anteater-security-audit.sh
jjb/ci_gate_security/opnfv-ci-gate-security.yml
jjb/compass4nfv/compass-ci-jobs.yml
jjb/compass4nfv/compass-verify-jobs.yml
jjb/daisy4nfv/daisy-daily-jobs.yml
jjb/daisy4nfv/daisy-project-jobs.yml
jjb/doctor/doctor.yml
jjb/dovetail/dovetail-ci-jobs.yml
jjb/dovetail/dovetail-run.sh
jjb/dovetail/dovetail-weekly-jobs.yml
jjb/fuel/fuel-daily-jobs.yml
jjb/fuel/fuel-project-jobs.yml
jjb/fuel/fuel-weekly-jobs.yml
jjb/functest/functest-project-jobs.yml
jjb/global/installer-params.yml
jjb/global/releng-macros.yml
jjb/global/slave-params.yml
jjb/joid/joid-daily-jobs.yml
jjb/joid/joid-deploy.sh
jjb/kvmfornfv/kvmfornfv.yml
jjb/multisite/multisite-daily-jobs.yml
jjb/ovsnfv/ovsnfv.yml
jjb/qtip/qtip-integration-jobs.yml [new file with mode: 0644]
jjb/qtip/qtip-validate-jobs.yml
jjb/qtip/qtip-verify-jobs.yml
jjb/qtip/qtip-weekly-jobs.yml
jjb/releng/automate.yml
jjb/releng/opnfv-docker-arm.yml
jjb/releng/opnfv-docker.yml
jjb/releng/releng-ci-jobs.yml
jjb/storperf/storperf.yml
jjb/xci/bifrost-cleanup-job.yml
jjb/xci/bifrost-verify-jobs.yml
jjb/xci/xci-daily-jobs.yml
jjb/yardstick/yardstick-daily-jobs.yml
utils/push-test-logs.sh
utils/test/reporting/api/__init__.py [moved from utils/test/reporting/api/api/__init__.py with 100% similarity]
utils/test/reporting/api/conf.py [moved from utils/test/reporting/api/api/conf.py with 100% similarity]
utils/test/reporting/api/handlers/__init__.py [moved from utils/test/reporting/api/api/handlers/__init__.py with 100% similarity]
utils/test/reporting/api/handlers/landing.py [moved from utils/test/reporting/api/api/handlers/landing.py with 100% similarity]
utils/test/reporting/api/handlers/projects.py [moved from utils/test/reporting/api/api/handlers/projects.py with 100% similarity]
utils/test/reporting/api/handlers/testcases.py [moved from utils/test/reporting/api/api/handlers/testcases.py with 100% similarity]
utils/test/reporting/api/requirements.txt [deleted file]
utils/test/reporting/api/server.py [moved from utils/test/reporting/api/api/server.py with 100% similarity]
utils/test/reporting/api/setup.cfg [deleted file]
utils/test/reporting/api/setup.py [deleted file]
utils/test/reporting/api/urls.py [moved from utils/test/reporting/api/api/urls.py with 100% similarity]
utils/test/reporting/docker/Dockerfile
utils/test/reporting/docker/nginx.conf
utils/test/reporting/docker/reporting.sh
utils/test/reporting/docker/supervisor.conf
utils/test/reporting/docker/web_server.sh [new file with mode: 0755]
utils/test/reporting/docs/_build/.buildinfo [new file with mode: 0644]
utils/test/reporting/docs/_build/.doctrees/environment.pickle [new file with mode: 0644]
utils/test/reporting/docs/_build/.doctrees/index.doctree [new file with mode: 0644]
utils/test/reporting/docs/conf.py [new file with mode: 0644]
utils/test/reporting/docs/index.rst [new file with mode: 0644]
utils/test/reporting/reporting/__init__.py [moved from utils/test/reporting/functest/__init__.py with 100% similarity]
utils/test/reporting/reporting/functest/__init__.py [moved from utils/test/reporting/qtip/__init__.py with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_0.png [moved from utils/test/reporting/functest/img/gauge_0.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_100.png [moved from utils/test/reporting/functest/img/gauge_100.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_16.7.png [moved from utils/test/reporting/functest/img/gauge_16.7.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_25.png [moved from utils/test/reporting/functest/img/gauge_25.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_33.3.png [moved from utils/test/reporting/functest/img/gauge_33.3.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_41.7.png [moved from utils/test/reporting/functest/img/gauge_41.7.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_50.png [moved from utils/test/reporting/functest/img/gauge_50.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_58.3.png [moved from utils/test/reporting/functest/img/gauge_58.3.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_66.7.png [moved from utils/test/reporting/functest/img/gauge_66.7.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_75.png [moved from utils/test/reporting/functest/img/gauge_75.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_8.3.png [moved from utils/test/reporting/functest/img/gauge_8.3.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_83.3.png [moved from utils/test/reporting/functest/img/gauge_83.3.png with 100% similarity]
utils/test/reporting/reporting/functest/img/gauge_91.7.png [moved from utils/test/reporting/functest/img/gauge_91.7.png with 100% similarity]
utils/test/reporting/reporting/functest/img/icon-nok.png [moved from utils/test/reporting/functest/img/icon-nok.png with 100% similarity]
utils/test/reporting/reporting/functest/img/icon-ok.png [moved from utils/test/reporting/functest/img/icon-ok.png with 100% similarity]
utils/test/reporting/reporting/functest/img/weather-clear.png [moved from utils/test/reporting/functest/img/weather-clear.png with 100% similarity]
utils/test/reporting/reporting/functest/img/weather-few-clouds.png [moved from utils/test/reporting/functest/img/weather-few-clouds.png with 100% similarity]
utils/test/reporting/reporting/functest/img/weather-overcast.png [moved from utils/test/reporting/functest/img/weather-overcast.png with 100% similarity]
utils/test/reporting/reporting/functest/img/weather-storm.png [moved from utils/test/reporting/functest/img/weather-storm.png with 100% similarity]
utils/test/reporting/reporting/functest/index.html [moved from utils/test/reporting/functest/index.html with 100% similarity]
utils/test/reporting/reporting/functest/reporting-status.py [moved from utils/test/reporting/functest/reporting-status.py with 98% similarity]
utils/test/reporting/reporting/functest/reporting-tempest.py [moved from utils/test/reporting/functest/reporting-tempest.py with 98% similarity]
utils/test/reporting/reporting/functest/reporting-vims.py [moved from utils/test/reporting/functest/reporting-vims.py with 97% similarity]
utils/test/reporting/reporting/functest/scenarioResult.py [moved from utils/test/reporting/functest/scenarioResult.py with 100% similarity]
utils/test/reporting/reporting/functest/template/index-status-tmpl.html [moved from utils/test/reporting/functest/template/index-status-tmpl.html with 100% similarity]
utils/test/reporting/reporting/functest/template/index-tempest-tmpl.html [moved from utils/test/reporting/functest/template/index-tempest-tmpl.html with 100% similarity]
utils/test/reporting/reporting/functest/template/index-vims-tmpl.html [moved from utils/test/reporting/functest/template/index-vims-tmpl.html with 100% similarity]
utils/test/reporting/reporting/functest/testCase.py [moved from utils/test/reporting/functest/testCase.py with 100% similarity]
utils/test/reporting/reporting/qtip/__init__.py [moved from utils/test/reporting/tests/__init__.py with 100% similarity]
utils/test/reporting/reporting/qtip/index.html [moved from utils/test/reporting/qtip/index.html with 100% similarity]
utils/test/reporting/reporting/qtip/reporting-status.py [moved from utils/test/reporting/qtip/reporting-status.py with 93% similarity]
utils/test/reporting/reporting/qtip/template/index-status-tmpl.html [moved from utils/test/reporting/qtip/template/index-status-tmpl.html with 100% similarity]
utils/test/reporting/reporting/reporting.yaml [moved from utils/test/reporting/reporting.yaml with 100% similarity]
utils/test/reporting/reporting/storperf/__init__.py [moved from utils/test/reporting/tests/unit/__init__.py with 100% similarity]
utils/test/reporting/reporting/storperf/reporting-status.py [moved from utils/test/reporting/storperf/reporting-status.py with 98% similarity]
utils/test/reporting/reporting/storperf/template/index-status-tmpl.html [moved from utils/test/reporting/storperf/template/index-status-tmpl.html with 100% similarity]
utils/test/reporting/reporting/tests/__init__.py [moved from utils/test/reporting/tests/unit/utils/__init__.py with 100% similarity]
utils/test/reporting/reporting/tests/unit/__init__.py [moved from utils/test/reporting/utils/__init__.py with 100% similarity]
utils/test/reporting/reporting/tests/unit/utils/__init__.py [new file with mode: 0644]
utils/test/reporting/reporting/tests/unit/utils/test_utils.py [moved from utils/test/reporting/tests/unit/utils/test_utils.py with 78% similarity]
utils/test/reporting/reporting/utils/__init__.py [new file with mode: 0644]
utils/test/reporting/reporting/utils/reporting_utils.py [moved from utils/test/reporting/utils/reporting_utils.py with 92% similarity]
utils/test/reporting/reporting/utils/scenarioResult.py [moved from utils/test/reporting/utils/scenarioResult.py with 100% similarity]
utils/test/reporting/reporting/yardstick/__init__.py [new file with mode: 0644]
utils/test/reporting/reporting/yardstick/img/gauge_0.png [moved from utils/test/reporting/yardstick/img/gauge_0.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_100.png [moved from utils/test/reporting/yardstick/img/gauge_100.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_16.7.png [moved from utils/test/reporting/yardstick/img/gauge_16.7.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_25.png [moved from utils/test/reporting/yardstick/img/gauge_25.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_33.3.png [moved from utils/test/reporting/yardstick/img/gauge_33.3.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_41.7.png [moved from utils/test/reporting/yardstick/img/gauge_41.7.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_50.png [moved from utils/test/reporting/yardstick/img/gauge_50.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_58.3.png [moved from utils/test/reporting/yardstick/img/gauge_58.3.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_66.7.png [moved from utils/test/reporting/yardstick/img/gauge_66.7.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_75.png [moved from utils/test/reporting/yardstick/img/gauge_75.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_8.3.png [moved from utils/test/reporting/yardstick/img/gauge_8.3.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_83.3.png [moved from utils/test/reporting/yardstick/img/gauge_83.3.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/gauge_91.7.png [moved from utils/test/reporting/yardstick/img/gauge_91.7.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/icon-nok.png [moved from utils/test/reporting/yardstick/img/icon-nok.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/icon-ok.png [moved from utils/test/reporting/yardstick/img/icon-ok.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/weather-clear.png [moved from utils/test/reporting/yardstick/img/weather-clear.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/weather-few-clouds.png [moved from utils/test/reporting/yardstick/img/weather-few-clouds.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/weather-overcast.png [moved from utils/test/reporting/yardstick/img/weather-overcast.png with 100% similarity]
utils/test/reporting/reporting/yardstick/img/weather-storm.png [moved from utils/test/reporting/yardstick/img/weather-storm.png with 100% similarity]
utils/test/reporting/reporting/yardstick/index.html [moved from utils/test/reporting/yardstick/index.html with 100% similarity]
utils/test/reporting/reporting/yardstick/reporting-status.py [moved from utils/test/reporting/yardstick/reporting-status.py with 98% similarity]
utils/test/reporting/reporting/yardstick/scenarios.py [moved from utils/test/reporting/yardstick/scenarios.py with 100% similarity]
utils/test/reporting/reporting/yardstick/template/index-status-tmpl.html [moved from utils/test/reporting/yardstick/template/index-status-tmpl.html with 100% similarity]
utils/test/reporting/requirements.txt [new file with mode: 0644]
utils/test/reporting/run_test.sh
utils/test/reporting/setup.cfg [new file with mode: 0644]
utils/test/reporting/setup.py
utils/test/reporting/test-requirements.txt [new file with mode: 0644]
utils/test/reporting/tox.ini [new file with mode: 0644]
utils/test/testapi/3rd_party/static/testapi-ui/app.js
utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/guidelines.html [deleted file]
utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/guidelinesController.js [deleted file]
utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/partials/guidelineDetails.html [deleted file]
utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html [deleted file]
utils/test/testapi/3rd_party/static/testapi-ui/components/pods/pods.html [new file with mode: 0644]
utils/test/testapi/3rd_party/static/testapi-ui/components/pods/podsController.js [new file with mode: 0644]
utils/test/testapi/3rd_party/static/testapi-ui/index.html
utils/test/testapi/3rd_party/static/testapi-ui/shared/header/header.html
utils/test/testapi/docker/prepare-env.sh
utils/test/testapi/etc/config.ini
utils/test/testapi/opnfv_testapi/cmd/server.py
utils/test/testapi/opnfv_testapi/tests/unit/common/noparam.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/normal.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/nosection.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/notboolean.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/notint.ini
utils/test/testapi/opnfv_testapi/tests/unit/common/test_config.py

index 97fea89..f5aab1a 100644 (file)
@@ -56,3 +56,4 @@
     publishers:
         - archive-artifacts:
             artifacts: 'job_output/*'
+        - email-jenkins-admins-on-failure
index 98a19d4..26eddb5 100644 (file)
               <<: *master
         - 'os-nosdn-bar-noha':
               <<: *master
+        - 'os-nosdn-nofeature-ha-ipv6':
+              <<: *master
+        - 'os-nosdn-ovs_dpdk-noha':
+              <<: *master
+        - 'os-nosdn-ovs_dpdk-ha':
+              <<: *master
+        - 'os-nosdn-kvm_ovs_dpdk-noha':
+              <<: *master
+        - 'os-nosdn-kvm_ovs_dpdk-ha':
+              <<: *master
+        - 'os-odl-sfc-noha':
+              <<: *master
+        - 'os-odl-sfc-ha':
+              <<: *master
 
     platform:
          - 'baremetal'
                   abort-all-job: true
                   git-revision: false
 
+    publishers:
+        - groovy-postbuild:
+            script:
+                !include-raw-escape: ./update-build-result.groovy
 
 # Baremetal test job
 - job-template:
                   enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/"
                   abort-all-job: false
                   git-revision: false
-        - conditional-step:
-            condition-kind: current-status
-            condition-worst: SUCCESS
-            condtion-best: SUCCESS
-            on-evaluation-failure: mark-unstable
-            steps:
-                - shell: 'echo "Tests Passed"'
 # Build status is always success due conditional plugin prefetching
 # build status before multijob phases execute
 #        - conditional-step:
 #            steps:
 #                - shell: 'echo "Tests Passed"'
 
-    publishers:
-        - groovy-postbuild:
-            script:
-                !include-raw-escape: ./update-build-result.groovy
-
 
 # danube Daily
 - job-template:
                   abort-all-job: true
                   git-revision: false
 
+                - name: 'apex-os-nosdn-nofeature-ha-ipv6-baremetal-master'
+                  node-parameters: false
+                  current-parameters: false
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                  kill-phase-on: NEVER
+                  abort-all-job: true
+                  git-revision: false
+
+                - name: 'apex-os-nosdn-ovs_dpdk-noha-baremetal-master'
+                  node-parameters: false
+                  current-parameters: false
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                  kill-phase-on: NEVER
+                  abort-all-job: true
+                  git-revision: false
+
+                - name: 'apex-os-nosdn-ovs_dpdk-ha-baremetal-master'
+                  node-parameters: false
+                  current-parameters: false
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                  kill-phase-on: NEVER
+                  abort-all-job: true
+                  git-revision: false
+
+                - name: 'apex-os-nosdn-kvm_ovs_dpdk-noha-baremetal-master'
+                  node-parameters: false
+                  current-parameters: false
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                  kill-phase-on: NEVER
+                  abort-all-job: true
+                  git-revision: false
+
+                - name: 'apex-os-nosdn-kvm_ovs_dpdk-ha-baremetal-master'
+                  node-parameters: false
+                  current-parameters: false
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                  kill-phase-on: NEVER
+                  abort-all-job: true
+                  git-revision: false
+
+                - name: 'apex-os-odl-sfc-noha-baremetal-master'
+                  node-parameters: false
+                  current-parameters: false
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                  kill-phase-on: NEVER
+                  abort-all-job: true
+                  git-revision: false
+
+                - name: 'apex-os-odl-sfc-ha-baremetal-master'
+                  node-parameters: false
+                  current-parameters: false
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                  kill-phase-on: NEVER
+                  abort-all-job: true
+                  git-revision: false
+
 
 
 # snapshot create
index a3cc9c6..5d7f150 100644 (file)
                   abort-all-job: true
                   git-revision: false
 
+    publishers:
+        - groovy-postbuild:
+            script:
+                !include-raw-escape: ./update-build-result.groovy
 
 # Baremetal test job
 - job-template:
                   enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/"
                   abort-all-job: false
                   git-revision: false
-        - conditional-step:
-            condition-kind: current-status
-            condition-worst: SUCCESS
-            condtion-best: SUCCESS
-            on-evaluation-failure: mark-unstable
-            steps:
-                - shell: 'echo "Tests Passed"'
 # Build status is always success due conditional plugin prefetching
 # build status before multijob phases execute
 #        - conditional-step:
 #            steps:
 #                - shell: 'echo "Tests Passed"'
 
-    publishers:
-        - groovy-postbuild:
-            script:
-                !include-raw-escape: ./update-build-result.groovy
-
 {% for stream in scenarios %}
 # {{ stream }} Daily
 - job-template:
index efb2a36..f49fa83 100644 (file)
@@ -11,6 +11,13 @@ master:
   - 'os-odl-fdio-ha'
   - 'os-nosdn-bar-ha'
   - 'os-nosdn-bar-noha'
+  - 'os-nosdn-nofeature-ha-ipv6'
+  - 'os-nosdn-ovs_dpdk-noha'
+  - 'os-nosdn-ovs_dpdk-ha'
+  - 'os-nosdn-kvm_ovs_dpdk-noha'
+  - 'os-nosdn-kvm_ovs_dpdk-ha'
+  - 'os-odl-sfc-noha'
+  - 'os-odl-sfc-ha'
 danube:
   - 'os-nosdn-nofeature-noha'
   - 'os-nosdn-nofeature-ha'
index a569e51..9edca6b 100644 (file)
@@ -1,4 +1,5 @@
 import hudson.model.*
-if (manager.build.@result == hudson.model.Result.FAILURE) {
+if (manager.logContains('^.*apex-deploy-baremetal.*SUCCESS$')
+      && manager.build.@result == hudson.model.Result.FAILURE) {
     manager.build.@result = hudson.model.Result.UNSTABLE
 }
index 0f08c31..a5d75bd 100644 (file)
     publishers:
         - email:
             recipients: armband@enea.com
+        - email-jenkins-admins-on-failure
 
 ########################
 # parameter macros
index 31b2bf6..0623b55 100644 (file)
@@ -67,6 +67,7 @@
     publishers:
         - email:
             recipients: armband@enea.com
+        - email-jenkins-admins-on-failure
 
 ########################
 # parameter macros
index 455fa72..71601cf 100644 (file)
     pod:
 #compass CI PODs
         - baremetal:
-            slave-label: compass-baremetal
+            slave-label: compass-baremetal-master
             installer: compass
             auto-trigger-name: 'daily-trigger-disabled'
             <<: *master
         - virtual:
-            slave-label: compass-virtual
+            slave-label: compass-virtual-master
             installer: compass
             auto-trigger-name: 'daily-trigger-disabled'
             <<: *master
         - baremetal:
-            slave-label: compass-baremetal
+            slave-label: compass-baremetal-branch
             installer: compass
             auto-trigger-name: 'daily-trigger-disabled'
             <<: *danube
         - virtual:
-            slave-label: compass-virtual
+            slave-label: compass-virtual-branch
             installer: compass
             auto-trigger-name: 'daily-trigger-disabled'
             <<: *danube
     publishers:
         - email:
             recipients: gabriel.yuyang@huawei.com, liyin11@huawei.com
+        - email-jenkins-admins-on-failure
 
 ########################
 # builder macros
 ####################
 
 - parameter:
-    name: 'bottlenecks-params-compass-baremetal'
+    name: 'bottlenecks-params-compass-baremetal-master'
     parameters:
         - string:
             name: BOTTLENECKS_DB_TARGET
-            default: '104.197.68.199:8086'
+            default: 'http://testresults.opnfv.org/test/api/v1/results'
             description: 'Arguments to use in order to choose the backend DB'
 
 - parameter:
-    name: 'bottlenecks-params-compass-virtual'
+    name: 'bottlenecks-params-compass-virtual-master'
     parameters:
         - string:
             name: BOTTLENECKS_DB_TARGET
-            default: ''
+            default: 'http://testresults.opnfv.org/test/api/v1/results'
             description: 'Arguments to use in order to choose the backend DB'
 
 - parameter:
-    name: 'bottlenecks-params-orange-pod2'
+    name: 'bottlenecks-params-compass-baremetal-branch'
     parameters:
         - string:
             name: BOTTLENECKS_DB_TARGET
-            default: '104.197.68.199:8086'
+            default: 'http://testresults.opnfv.org/test/api/v1/results'
+            description: 'Arguments to use in order to choose the backend DB'
+
+- parameter:
+    name: 'bottlenecks-params-compass-virtual-branch'
+    parameters:
+        - string:
+            name: BOTTLENECKS_DB_TARGET
+            default: 'http://testresults.opnfv.org/test/api/v1/results'
             description: 'Arguments to use in order to choose the backend DB'
index b81f4ca..6bab0e4 100644 (file)
@@ -53,18 +53,27 @@ if [[ $SUITE_NAME == *posca* ]]; then
     docker pull opnfv/bottlenecks:${DOCKER_TAG} >$redirect
 
     opts="--privileged=true -id"
+    envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
+          -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \
+          -e BRANCH=${BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \
+          -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL} \
+          -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
     docker_volume="-v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp"
 
-    cmd="docker run ${opts} --name bottlenecks-load-master ${docker_volume} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash"
+    cmd="docker run ${opts} ${envs} --name bottlenecks-load-master ${docker_volume} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash"
     echo "BOTTLENECKS INFO: running docker run commond: ${cmd}"
     ${cmd} >$redirect
     sleep 5
 
     if [[ $SUITE_NAME == posca_stress_traffic ]]; then
         TEST_CASE=posca_factor_system_bandwidth
-        docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT
+        testcase_cmd="docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT"
+        echo "BOTTLENECKS INFO: running test case ${TEST_CASE} with report indicator: ${testcase_cmd}"
+        ${testcase_cmd} >$redirect
     elif [[ $SUITE_NAME == posca_stress_ping ]]; then
         TEST_CASE=posca_factor_ping
-        docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT
+        testcase_cmd="docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py testcase $TEST_CASE $REPORT"
+        echo "BOTTLENECKS INFO: running test case ${TEST_CASE} with report indicator: ${testcase_cmd}"
+        ${testcase_cmd} >$redirect
     fi
 fi
index fc3018f..00a78ce 100644 (file)
@@ -12,14 +12,14 @@ if [[ -e securityaudit.log ]] ; then
     if grep ERROR securityaudit.log; then
         EXITSTATUS=1
     fi
-    
-    cat securityaudit.log  | awk -F"ERROR - " '{print $2}' > shortlog
-    
+
+    cat securityaudit.log  | awk -F"ERROR - " '{print $2}' | sed -e "s/\"/\\\\\"/g;s/\'/\\\\\'/g"> shortlog
+
     ssh -p 29418 gerrit.opnfv.org \
         "gerrit review -p $GERRIT_PROJECT \
         -m \"$(cat shortlog)\" \
         $GERRIT_PATCHSET_REVISION \
         --notify NONE"
-    
+
     exit $EXITSTATUS
 fi
index 9bd3cc3..35f9354 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/bash
 cd $WORKSPACE
+REPORTDIR='.reports'
+mkdir -p $REPORTDIR
 echo "Generating patchset file to list changed files"
 git diff HEAD^1 --name-only | sed "s#^#/home/opnfv/anteater/$PROJECT/#" > $WORKSPACE/patchset
 echo "Changed files are"
@@ -7,7 +9,7 @@ echo "--------------------------------------------------------"
 cat $WORKSPACE/patchset
 echo "--------------------------------------------------------"
 
-vols="-v $WORKSPACE:/home/opnfv/anteater/$PROJECT"
+vols="-v $WORKSPACE:/home/opnfv/anteater/$PROJECT -v $WORKSPACE/$REPORTDIR:/home/opnfv/anteater/$REPORTDIR"
 envs="-e PROJECT=$PROJECT"
 
 echo "Pulling releng-anteater docker image"
index d991573..55d629c 100644 (file)
     builders:
         - anteater-security-audit
         - report-security-audit-result-to-gerrit
+    publishers:
+      - archive-artifacts:
+          artifacts: ".reports/*"
+
 ########################
 # builder macros
 ########################
index c98fd36..4c12f19 100644 (file)
 - trigger:
     name: 'compass-os-odl_l2-nofeature-ha-baremetal-centos-master-trigger'
     triggers:
-        - timed: '0 23 * * *'
+        - timed: ''
 - trigger:
     name: 'compass-os-odl_l3-nofeature-ha-baremetal-centos-master-trigger'
     triggers:
 - trigger:
     name: 'compass-os-odl_l2-nofeature-ha-baremetal-master-trigger'
     triggers:
-        - timed: '0 22 * * *'
+        - timed: ''
 - trigger:
     name: 'compass-os-odl_l3-nofeature-ha-baremetal-master-trigger'
     triggers:
 - trigger:
     name: 'compass-os-odl_l2-nofeature-ha-virtual-master-trigger'
     triggers:
-        - timed: '0 20 * * *'
+        - timed: ''
 - trigger:
     name: 'compass-os-odl_l3-nofeature-ha-virtual-master-trigger'
     triggers:
index f016b91..ee91e02 100644 (file)
             projects:
                 - name: 'functest-compass-virtual-suite-{stream}'
                   current-parameters: false
-                  predefined-parameters:
+                  predefined-parameters: |
                     FUNCTEST_SUITE_NAME=healthcheck
+                    DEPLOY_SCENARIO=os-nosdn-nofeature-ha
                   node-parameters: true
                   kill-phase-on: NEVER
                   abort-all-job: true
                 - name: 'functest-compass-virtual-suite-{stream}'
                   current-parameters: false
-                  predefined-parameters:
+                  predefined-parameters: |
                     FUNCTEST_SUITE_NAME=vping_ssh
+                    DEPLOY_SCENARIO=os-nosdn-nofeature-ha
                   node-parameters: true
                   kill-phase-on: NEVER
                   abort-all-job: true
index 6524d20..d7c1acb 100644 (file)
         - 'os-nosdn-nofeature-noha':
             auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger'
         # ODL_L3 scenarios
-        - 'os-odl_l3-nofeature-ha':
-            auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger'
-        # ODL_L2 scenarios
-        - 'os-odl_l2-nofeature-ha':
+        - 'os-odl-nofeature-ha':
             auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger'
 
     jobs:
 #-----------------------------------------------
 # Triggers for job running on daisy-baremetal against master branch
 #-----------------------------------------------
-# HA Scenarios
+# Basic HA Scenarios
 - trigger:
     name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-master-trigger'
     triggers:
         - timed: '0 12 * * *'
-# NOHA Scenarios
+# Basic NOHA Scenarios
 - trigger:
     name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-master-trigger'
     triggers:
         - timed: ''
-# ODL_L3 Scenarios
+# ODL Scenarios
 - trigger:
-    name: 'daisy-os-odl_l3-nofeature-ha-baremetal-daily-master-trigger'
+    name: 'daisy-os-odl-nofeature-ha-baremetal-daily-master-trigger'
     triggers:
         - timed: '0 16 * * *'
-# ODL_L2 Scenarios
-- trigger:
-    name: 'daisy-os-odl_l2-nofeature-ha-baremetal-daily-master-trigger'
-    triggers:
-        - timed: ''
 #-----------------------------------------------
 # Triggers for job running on daisy-virtual against master branch
 #-----------------------------------------------
+# Basic HA Scenarios
 - trigger:
     name: 'daisy-os-nosdn-nofeature-ha-virtual-daily-master-trigger'
     triggers:
         - timed: '0 12 * * *'
-# NOHA Scenarios
+# Basic NOHA Scenarios
 - trigger:
     name: 'daisy-os-nosdn-nofeature-noha-virtual-daily-master-trigger'
     triggers:
         - timed: ''
-# ODL_L3 Scenarios
+# ODL Scenarios
 - trigger:
-    name: 'daisy-os-odl_l3-nofeature-ha-virtual-daily-master-trigger'
+    name: 'daisy-os-odl-nofeature-ha-virtual-daily-master-trigger'
     triggers:
         - timed: '0 16 * * *'
-# ODL_L3 Scenarios
-- trigger:
-    name: 'daisy-os-odl_l2-nofeature-ha-virtual-daily-master-trigger'
-    triggers:
-        - timed: ''
-
index bae75dd..fd0da79 100644 (file)
 
     publishers:
         - '{installer}-recipients'
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: '{installer}-{phase}-daily-{stream}'
     publishers:
         - email:
             recipients: hu.zhijiang@zte.com.cn lu.yao135@zte.com.cn zhou.ya@zte.com.cn yangyang1@zte.com.cn julienjut@gmail.com
+        - email-jenkins-admins-on-failure
 
 - parameter:
     name: 'daisy-project-parameter'
index c6b2cb6..afde9ef 100644 (file)
         - '{auto-trigger-name}':
             project: '{project}'
             branch: '{branch}'
+            files: 'tests/**'
 
     builders:
         - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh"
         - '{auto-trigger-name}':
             project: '{project}'
             branch: '{branch}'
+            files: 'tests/**'
 
     builders:
         - 'clean-workspace-log'
             artifacts: 'tests/*.log'
         - archive:
             artifacts: 'functest_results/$FUNCTEST_SUITE_NAME.log'
+        - email-jenkins-admins-on-failure
 
 
 #####################################
                     branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: ANT
-                    pattern: 'tests/**'
+                    pattern: '{files}'
             skip-vote:
                 successful: true
                 failed: true
index bcda2b7..3f130c9 100644 (file)
@@ -25,7 +25,7 @@
         branch: 'stable/{stream}'
         dovetail-branch: master
         gs-pathname: '/{stream}'
-        docker-tag: 'cvp.0.3.0'
+        docker-tag: 'cvp.0.4.0'
 
 #-----------------------------------
 # POD, PLATFORM, AND BRANCH MAPPING
             artifacts: 'results/**/*'
             allow-empty: true
             fingerprint: true
+        - email-jenkins-admins-on-failure
 
 #--------------------------
 # builder macros
index f75cdde..a078c8f 100755 (executable)
@@ -170,5 +170,8 @@ sudo cp -r ${DOVETAIL_HOME}/results ./
 # PRIMARY_GROUP=$(id -gn $CURRENT_USER)
 # sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ${WORKSPACE}/results
 
+#remove useless workspace from yardstick to save disk space
+sudo rm -rf ./results/workspace
+
 echo "Dovetail: done!"
 
index 700657d..11904cb 100644 (file)
             artifacts: 'results/**/*'
             allow-empty: true
             fingerprint: true
+        - email-jenkins-admins-on-failure
 
 ########################
 # builder macros
index 7ec74e4..4b2f8e9 100644 (file)
     publishers:
         - email:
             recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: 'fuel-deploy-{pod}-daily-{stream}'
     publishers:
         - email:
             recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com
+        - email-jenkins-admins-on-failure
 
 ########################
 # parameter macros
index faffa0a..6bb7e51 100644 (file)
@@ -79,6 +79,7 @@
     publishers:
         - email:
             recipients: fzhadaev@mirantis.com
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: 'fuel-merge-build-{stream}'
     publishers:
         - email:
             recipients: fzhadaev@mirantis.com
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: 'fuel-deploy-generic-daily-{stream}'
index 655a70a..57e36e1 100644 (file)
     publishers:
         - email:
             recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: 'fuel-deploy-{pod}-weekly-{stream}'
     publishers:
         - email:
             recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com
+        - email-jenkins-admins-on-failure
 
 ########################
 # parameter macros
index 353423d..1966e52 100644 (file)
@@ -80,6 +80,7 @@
                     healthy: 50
                     unhealthy: 40
                     failing: 30
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: 'functest-docs-upload-{stream}'
index 17101ed..c4e715d 100644 (file)
         - string:
             name: BRIDGE
             default: 'br7'
-            description: 'pxe bridge for booting of Fuel master'
+            description: 'pxe bridge for booting of Daisy master'
 
 - parameter:
     name: 'infra-defaults'
index 92199d6..89a3802 100644 (file)
                         branch-pattern: '**/{branch}'
                   file-paths:
                       - compare-type: 'ANT'
-                        pattern: 'tests/**'
+                        pattern: '{files}'
             skip-vote:
                 successful: true
                 failed: true
index 7a257f1..0e23380 100644 (file)
         - string:
             name: BRIDGE
             default: 'daisy1'
-            description: 'pxe bridge for booting of Fuel master'
+            description: 'pxe bridge for booting of Daisy master'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
             name: BRIDGE
             default: 'br0'
             description: 'pxe bridge for booting of Fuel master'
+- parameter:
+    name: zte-pod4-defaults
+    parameters:
+        - node:
+            name: SLAVE_NAME
+            description: 'Slave name on Jenkins'
+            allowed-slaves:
+                - zte-pod4
+            default-slaves:
+                - zte-pod4
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: 'Git URL to use on this Jenkins Slave'
 - parameter:
     name: 'juniper-pod1-defaults'
     parameters:
index 1ff260a..1c7b8cd 100644 (file)
@@ -70,6 +70,8 @@
             auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
         - 'k8-ovn-lb-noha':
             auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
+        - 'os-nosdn-openbaton-ha':
+            auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
 
     jobs:
         - 'joid-{scenario}-{pod}-daily-{stream}'
     name: 'joid-k8-ovn-lb-noha-cengn-pod1-master-trigger'
     triggers:
         - timed: ''
+
+# os-nosdn-openbaton-ha trigger - branch: master
+- trigger:
+    name: 'joid-os-nosdn-openbaton-ha-baremetal-master-trigger'
+    triggers:
+        - timed: '5 25 * * *'
+- trigger:
+    name: 'joid-os-nosdn-openbaton-ha-virtual-master-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'joid-os-nosdn-openbaton-ha-orange-pod1-master-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'joid-os-nosdn-openbaton-ha-cengn-pod1-master-trigger'
+    triggers:
+        - timed: ''
index e197dbd..9740d38 100644 (file)
@@ -94,9 +94,6 @@ EXTRA=${DEPLOY_OPTIONS[4]}
 if [ "$SDN_CONTROLLER" == 'odl_l2' ] || [ "$SDN_CONTROLLER" == 'odl_l3' ]; then
     SDN_CONTROLLER='odl'
 fi
-if [ "$HA_MODE" == 'noha' ]; then
-    HA_MODE='nonha'
-fi
 
 # Add extra to features
 if [ "$EXTRA" != "" ];then
index e5b56bf..a39249a 100644 (file)
@@ -26,6 +26,7 @@
     testname:
         - 'cyclictest'
         - 'packet_forward'
+        - 'livemigration'
 #####################################
 # patch verification phases
 #####################################
                   git-revision: true
                   kill-phase-on: FAILURE
                   abort-all-job: true
+        - multijob:
+            name: livemigration-test
+            condition: SUCCESSFUL
+            projects:
+                - name: 'kvmfornfv-livemigration-daily-test-{stream}'
+                  current-parameters: false
+                  node-parameters: false
+                  git-revision: true
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+
 
 - job-template:
     name: 'kvmfornfv-daily-build-{stream}'
             !include-raw: ./kvmfornfv-download-artifact.sh
         - shell:
             !include-raw: ./kvmfornfv-test.sh
+- builder:
+    name: 'kvmfornfv-livemigration-daily-test-macro'
+    builders:
+        - shell:
+            !include-raw: ./kvmfornfv-download-artifact.sh
+        - shell:
+            !include-raw: ./kvmfornfv-test.sh
+
 #####################################
 # parameter macros
 #####################################
index 06cefb6..c5e1866 100644 (file)
 
     publishers:
         - 'multisite-{phase}-publisher'
+        - email-jenkins-admins-on-failure
 
 ########################
 # builder macros
index 0e8c713..62f6de0 100644 (file)
     publishers:
         - email:
             recipients: therbert@redhat.com mark.d.gray@intel.com billy.o.mahony@intel.com
+        - email-jenkins-admins-on-failure
 
 - builder:
     name: build-rpms
diff --git a/jjb/qtip/qtip-integration-jobs.yml b/jjb/qtip/qtip-integration-jobs.yml
new file mode 100644 (file)
index 0000000..4382dff
--- /dev/null
@@ -0,0 +1,48 @@
+######################
+# verify before MERGE
+######################
+
+- project:
+    name: qtip-integration-jobs
+    project: qtip
+    jobs:
+        - 'qtip-storage-{stream}'
+    stream:
+        - master:
+            branch: '{stream}'
+            gs-pathname: ''
+            disabled: false
+
+################################
+## job templates
+#################################
+
+- job-template:
+    name: 'qtip-storage-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+            branch: '{branch}'
+        # Pin the tests on zte-pod4 with apex deployment
+        - apex-defaults
+        - zte-pod4-defaults
+    scm:
+        - git-scm-gerrit
+
+    triggers:
+        - experimental:
+            project: '{project}'
+            branch: '{branch}'
+            files: '**'
+
+    builders:
+        - shell: |
+             #!/bin/bash
+                set -o errexit
+                set -o pipefail
+                set -o xtrace
+
+                source integration/storperf/run_ci.sh
index 9f1ccec..73d7993 100644 (file)
@@ -66,6 +66,7 @@
         - qtip-validate-deploy
     publishers:
         - qtip-common-publishers
+        - email-jenkins-admins-on-failure
 
 ################
 # MARCOS
index 4a7dd45..a273c85 100644 (file)
@@ -64,6 +64,7 @@
         - qtip-unit-tests-and-docs-build
     publishers:
         - publish-coverage
+        - email-jenkins-admins-on-failure
 
 # upload juypter notebook to artifacts for review
 - job-template:
index 2170de7..0182488 100644 (file)
@@ -71,6 +71,7 @@
     publishers:
         - email:
             recipients: wu.zhihui1@zte.com.cn, zhang.yujunz@zte.com.cn
+        - email-jenkins-admins-on-failure
 
 ################
 # MARCOS
index 4f6044b..d12ee5d 100644 (file)
@@ -90,6 +90,7 @@
 
     publishers:
         - publish-coverage
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: '{module}-automate-{stream}'
 
     publishers:
         - 'email-publisher'
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: '{module}-automate-{phase}-{stream}'
index 7502b17..d70640a 100644 (file)
@@ -87,3 +87,4 @@
     publishers:
         - email:
             recipients: '{receivers}'
+        - email-jenkins-admins-on-failure
index fa9c441..7e605b9 100644 (file)
     publishers:
         - email:
             recipients: '{receivers}'
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: '{project}-docker-build-push-monitor-{stream}'
index ecc8730..dc9bfd5 100644 (file)
@@ -52,6 +52,7 @@
     publishers:
         - archive-artifacts:
             artifacts: 'job_output/*'
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: 'releng-merge-jjb'
index 13186a1..f675cbb 100644 (file)
@@ -81,6 +81,7 @@
                     healthy: 50
                     unhealthy: 40
                     failing: 30
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: 'storperf-merge-{stream}'
                     healthy: 50
                     unhealthy: 40
                     failing: 30
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: 'storperf-daily-{stream}'
index d5a444d..998464a 100644 (file)
@@ -83,6 +83,7 @@
     publishers:
         - email:
             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com zhang.jun3g@zte.com.cn
+        - email-jenkins-admins-on-failure
 #--------------------------------
 # trigger macros
 #--------------------------------
index 319f8eb..fbe7ecf 100644 (file)
     publishers:
         - email:
             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
+        - email-jenkins-admins-on-failure
 #--------------------------------
 # trigger macros
 #--------------------------------
index 64e13d3..b582772 100644 (file)
     publishers:
         - email:
             recipients: fatih.degirmenci@ericsson.com yroblamo@redhat.com mchandras@suse.de jack.morgan@intel.com julienjut@gmail.com
+        - email-jenkins-admins-on-failure
 
 - job-template:
     name: 'xci-{phase}-{pod}-{distro}-daily-{stream}'
index 4dcface..007384b 100644 (file)
     publishers:
         - email:
             recipients: jean.gaoliang@huawei.com limingjiang@huawei.com ross.b.brattain@intel.com
+        - email-jenkins-admins-on-failure
 
 ########################
 # builder macros
index 5021b78..eb57deb 100644 (file)
@@ -30,7 +30,8 @@ node_list=(\
 'arm-pod1' 'arm-pod3' \
 'huawei-pod1' 'huawei-pod2' 'huawei-pod3' 'huawei-pod4' 'huawei-pod5' \
 'huawei-pod6' 'huawei-pod7' 'huawei-pod12' \
-'huawei-virtual1' 'huawei-virtual2' 'huawei-virtual3' 'huawei-virtual4'\
+'huawei-virtual1' 'huawei-virtual2' 'huawei-virtual3' 'huawei-virtual4' \
+'zte-pod2' \
 'zte-virtual1')
 
 
diff --git a/utils/test/reporting/api/requirements.txt b/utils/test/reporting/api/requirements.txt
deleted file mode 100644 (file)
index 12ad688..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-tornado==4.4.2
-requests==2.1.0
-
diff --git a/utils/test/reporting/api/setup.cfg b/utils/test/reporting/api/setup.cfg
deleted file mode 100644 (file)
index 53d1092..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-[metadata]
-name = reporting
-
-author = JackChan
-author-email = chenjiankun1@huawei.com
-
-classifier =
-    Environment :: opnfv
-    Intended Audience :: Information Technology
-    Intended Audience :: System Administrators
-    License :: OSI Approved :: Apache Software License
-    Operating System :: POSIX :: Linux
-    Programming Language :: Python
-    Programming Language :: Python :: 2
-    Programming Language :: Python :: 2.7
-
-[global]
-setup-hooks =
-    pbr.hooks.setup_hook
-
-[files]
-packages =
-    api
-
-[entry_points]
-console_scripts =
-    api = api.server:main
-
-[egg_info]
-tag_build =
-tag_date = 0
-tag_svn_revision = 0
diff --git a/utils/test/reporting/api/setup.py b/utils/test/reporting/api/setup.py
deleted file mode 100644 (file)
index d974816..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-import setuptools
-
-
-__author__ = 'JackChan'
-
-
-setuptools.setup(
-    setup_requires=['pbr>=1.8'],
-    pbr=True)
index ad278ce..f5168d1 100644 (file)
 FROM nginx:stable
 
 MAINTAINER Morgan Richomme <morgan.richomme@orange.com>
-LABEL version="danube.1.0" description="OPNFV Test Reporting Docker container"
+LABEL version="1.0" description="OPNFV Test Reporting Docker container"
 
 ARG BRANCH=master
 
 ENV HOME /home/opnfv
-ENV working_dir /home/opnfv/utils/test/reporting
-ENV TERM xterm
-ENV COLORTERM gnome-terminal
-ENV CONFIG_REPORTING_YAML /home/opnfv/utils/test/reporting/reporting.yaml
+ENV working_dir ${HOME}/releng/utils/test/reporting
+ENV CONFIG_REPORTING_YAML ${working_dir}/reporting.yaml
 
+WORKDIR ${HOME}
 # Packaged dependencies
 RUN apt-get update && apt-get install -y \
 ssh \
 python-pip \
 git-core \
-wkhtmltopdf \
 nodejs \
 npm \
 supervisor \
@@ -39,15 +37,13 @@ supervisor \
 
 RUN pip install --upgrade pip
 
-RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng /home/opnfv
-RUN pip install -r ${working_dir}/docker/requirements.pip
-
-WORKDIR ${working_dir}/api
-RUN pip install -r requirements.txt
-RUN python setup.py install
+RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${HOME}/releng
+RUN pip install -r ${working_dir}/requirements.txt
 
 WORKDIR ${working_dir}
+RUN python setup.py install
 RUN docker/reporting.sh
+RUN docker/web_server.sh
 
 expose 8000
 
index 9e26972..ced8179 100644 (file)
@@ -15,10 +15,10 @@ server {
     }
 
     location /reporting/ {
-        alias /home/opnfv/utils/test/reporting/pages/dist/;
+        alias /home/opnfv/releng/utils/test/reporting/pages/dist/;
     }
 
     location /display/ {
-        alias /home/opnfv/utils/test/reporting/display/;
+        alias /home/opnfv/releng/utils/test/reporting/display/;
     }
 }
index 7fe97a8..076dc47 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/bash
 
-export PYTHONPATH="${PYTHONPATH}:."
-export CONFIG_REPORTING_YAML=./reporting.yaml
+export PYTHONPATH="${PYTHONPATH}:./reporting"
+export CONFIG_REPORTING_YAML=./reporting/reporting.yaml
 
 declare -a versions=(danube master)
-declare -a projects=(functest storperf yardstick)
+declare -a projects=(functest storperf yardstick qtip)
 
 project=$1
 reporting_type=$2
@@ -29,8 +29,9 @@ cp -Rf js display
 #  projet   |        option
 #   $1      |          $2
 # functest  | status, vims, tempest
-# yardstick |
-# storperf  |
+# yardstick | status
+# storperf  | status
+# qtip      | status
 
 function report_project()
 {
@@ -40,7 +41,7 @@ function report_project()
   echo "********************************"
   echo " $project reporting "
   echo "********************************"
-  python ./$dir/reporting-$type.py
+  python ./reporting/$dir/reporting-$type.py
   if [ $? ]; then
     echo "$project reporting $type...OK"
   else
@@ -50,53 +51,28 @@ function report_project()
 
 if [ -z "$1" ]; then
   echo "********************************"
-  echo " Functest reporting "
+  echo " * Static status reporting     *"
   echo "********************************"
-  echo "reporting vIMS..."
-  python ./functest/reporting-vims.py
-  echo "reporting vIMS...OK"
-  sleep 10
-  echo "reporting Tempest..."
-  python ./functest/reporting-tempest.py
-  echo "reporting Tempest...OK"
-  sleep 10
-  echo "reporting status..."
-  python ./functest/reporting-status.py
-  echo "Functest reporting status...OK"
-
-  echo "********************************"
-  echo " Yardstick reporting "
-  echo "********************************"
-  python ./yardstick/reporting-status.py
-  echo "Yardstick reporting status...OK"
+  for i in "${projects[@]}"
+  do
+    report_project $i $i "status"
+    sleep 5
+  done
+  report_project "QTIP" "qtip" "status"
 
-  echo "********************************"
-  echo " Storperf reporting "
-  echo "********************************"
-  python ./storperf/reporting-status.py
-  echo "Storperf reporting status...OK"
 
-  report_project "QTIP" "qtip" "status"
+  echo "Functest reporting vIMS..."
+  report_project "functest" "functest" "vims"
+  echo "reporting vIMS...OK"
+  sleep 5
+  echo "Functest reporting Tempest..."
+  report_project "functest" "functest" "tempest"
+  echo "reporting Tempest...OK"
+  sleep 5
 
 else
   if [ -z "$2" ]; then
     reporting_type="status"
   fi
-  echo "********************************"
-  echo " $project/$reporting_type reporting "
-  echo "********************************"
-  python ./$project/reporting-$reporting_type.py
+  report_project $project $project $reporting_type
 fi
-cp -r display /usr/share/nginx/html
-
-
-# nginx config
-cp /home/opnfv/utils/test/reporting/docker/nginx.conf /etc/nginx/conf.d/
-echo "daemon off;" >> /etc/nginx/nginx.conf
-
-# supervisor config
-cp /home/opnfv/utils/test/reporting/docker/supervisor.conf /etc/supervisor/conf.d/
-
-ln -s /usr/bin/nodejs /usr/bin/node
-
-cd pages && /bin/bash angular.sh
index b323dd0..49310d4 100644 (file)
@@ -3,7 +3,7 @@ nodaemon = true
 
 [program:tornado]
 user = root
-directory = /home/opnfv/utils/test/reporting/api/api
+directory = /home/opnfv/releng/utils/test/reporting/api
 command = python server.py --port=800%(process_num)d
 process_name=%(program_name)s%(process_num)d
 numprocs=4
@@ -15,5 +15,5 @@ command = service nginx restart
 
 [program:configuration]
 user = root
-directory = /home/opnfv/utils/test/reporting/pages
+directory = /home/opnfv/releng/utils/test/reporting/pages
 command = bash config.sh
diff --git a/utils/test/reporting/docker/web_server.sh b/utils/test/reporting/docker/web_server.sh
new file mode 100755 (executable)
index 0000000..a34c11d
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+cp -r display /usr/share/nginx/html
+
+
+# nginx config
+cp /home/opnfv/releng/utils/test/reporting/docker/nginx.conf /etc/nginx/conf.d/
+echo "daemon off;" >> /etc/nginx/nginx.conf
+
+# supervisor config
+cp /home/opnfv/releng/utils/test/reporting/docker/supervisor.conf /etc/supervisor/conf.d/
+
+ln -s /usr/bin/nodejs /usr/bin/node
+
+# Manage Angular front end
+cd pages && /bin/bash angular.sh
+
diff --git a/utils/test/reporting/docs/_build/.buildinfo b/utils/test/reporting/docs/_build/.buildinfo
new file mode 100644 (file)
index 0000000..6bd6fd6
--- /dev/null
@@ -0,0 +1,4 @@
+# Sphinx build info version 1
+# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
+config: 235ce07a48cec983846ad34dfd375b07
+tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/utils/test/reporting/docs/_build/.doctrees/environment.pickle b/utils/test/reporting/docs/_build/.doctrees/environment.pickle
new file mode 100644 (file)
index 0000000..23f59c3
Binary files /dev/null and b/utils/test/reporting/docs/_build/.doctrees/environment.pickle differ
diff --git a/utils/test/reporting/docs/_build/.doctrees/index.doctree b/utils/test/reporting/docs/_build/.doctrees/index.doctree
new file mode 100644 (file)
index 0000000..51e2d5a
Binary files /dev/null and b/utils/test/reporting/docs/_build/.doctrees/index.doctree differ
diff --git a/utils/test/reporting/docs/conf.py b/utils/test/reporting/docs/conf.py
new file mode 100644 (file)
index 0000000..2e70d2b
--- /dev/null
@@ -0,0 +1,341 @@
+# -*- coding: utf-8 -*-
+#
+# OPNFV testing Reporting documentation build configuration file, created by
+# sphinx-quickstart on Mon July 4 10:03:43 2017.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+    'sphinx.ext.autodoc',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The encoding of source files.
+#
+# source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'OPNFV Reporting'
+copyright = u'2017, #opnfv-testperf (chat.freenode.net)'
+author = u'#opnfv-testperf (chat.freenode.net)'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = u'master'
+# The full version, including alpha/beta/rc tags.
+release = u'master'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = 'en'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#
+# today = ''
+#
+# Else, today_fmt is used as the format for a strftime call.
+#
+# today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This patterns also effect to html_static_path and html_extra_path
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#
+# default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#
+# add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#
+# add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#
+# show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+# modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+# keep_warnings = False
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'alabaster'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#
+# html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+# html_theme_path = []
+
+# The name for this set of Sphinx documents.
+# "<project> v<release> documentation" by default.
+#
+# html_title = u'OPNFV Functest vmaster'
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#
+# html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#
+# html_logo = None
+
+# The name of an image file (relative to this directory) to use as a favicon of
+# the docs.  This file should be a Windows icon file (.ico) being 16x16 or
+# 32x32 pixels large.
+#
+# html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#
+# html_extra_path = []
+
+# If not None, a 'Last updated on:' timestamp is inserted at every page
+# bottom, using the given strftime format.
+# The empty string is equivalent to '%b %d, %Y'.
+#
+# html_last_updated_fmt = None
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#
+# html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#
+# html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#
+# html_additional_pages = {}
+
+# If false, no module index is generated.
+#
+# html_domain_indices = True
+
+# If false, no index is generated.
+#
+# html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#
+# html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#
+# html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#
+# html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#
+# html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#
+# html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+# html_file_suffix = None
+
+# Language to be used for generating the HTML full-text search index.
+# Sphinx supports the following languages:
+#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
+#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
+#
+# html_search_language = 'en'
+
+# A dictionary with options for the search language support, empty by default.
+# 'ja' uses this config value.
+# 'zh' user can custom change `jieba` dictionary path.
+#
+# html_search_options = {'type': 'default'}
+
+# The name of a javascript file (relative to the configuration directory) that
+# implements a search results scorer. If empty, the default will be used.
+#
+# html_search_scorer = 'scorer.js'
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'OPNFVreportingdoc'
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+     # The paper size ('letterpaper' or 'a4paper').
+     #
+     # 'papersize': 'letterpaper',
+
+     # The font size ('10pt', '11pt' or '12pt').
+     #
+     # 'pointsize': '10pt',
+
+     # Additional stuff for the LaTeX preamble.
+     #
+     # 'preamble': '',
+
+     # Latex figure (float) alignment
+     #
+     # 'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+    (master_doc, 'OPNFVReporting.tex',
+     u'OPNFV testing Reporting Documentation',
+     u'\\#opnfv-testperf (chat.freenode.net)', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#
+# latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#
+# latex_use_parts = False
+
+# If true, show page references after internal links.
+#
+# latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#
+# latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#
+# latex_appendices = []
+
+# It false, will not define \strong, \code,    itleref, \crossref ... but only
+# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
+# packages.
+#
+# latex_keep_old_macro_names = True
+
+# If false, no module index is generated.
+#
+# latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    (master_doc, 'opnfvReporting', u'OPNFV Testing Reporting Documentation',
+     [author], 1)
+]
+
+# If true, show URL addresses after external links.
+#
+# man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+    (master_doc, 'OPNFVReporting', u'OPNFV Testing reporting Documentation',
+     author, 'OPNFVTesting', 'One line description of project.',
+     'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#
+# texinfo_appendices = []
+
+# If false, no module index is generated.
+#
+# texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#
+# texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#
+# texinfo_no_detailmenu = False
diff --git a/utils/test/reporting/docs/index.rst b/utils/test/reporting/docs/index.rst
new file mode 100644 (file)
index 0000000..af41876
--- /dev/null
@@ -0,0 +1,16 @@
+Welcome to OPNFV Testing reporting documentation!
+=================================================
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
@@ -18,6 +18,8 @@ import scenarioResult as sr
 # manage conf
 import utils.reporting_utils as rp_utils
 
+"""Functest reporting status"""
+
 # Logger
 logger = rp_utils.getLogger("Functest-Status")
 
@@ -272,7 +274,8 @@ for version in versions:
             templateEnv = jinja2.Environment(
                 loader=templateLoader, autoescape=True)
 
-            TEMPLATE_FILE = "./functest/template/index-status-tmpl.html"
+            TEMPLATE_FILE = ("./reporting/functest/template"
+                             "/index-status-tmpl.html")
             template = templateEnv.get_template(TEMPLATE_FILE)
 
             outputText = template.render(
@@ -142,7 +142,7 @@ for version in rp_utils.get_config('general.versions'):
         templateEnv = jinja2.Environment(loader=templateLoader,
                                          autoescape=True)
 
-        TEMPLATE_FILE = "./functest/template/index-tempest-tmpl.html"
+        TEMPLATE_FILE = "./reporting/functest/template/index-tempest-tmpl.html"
         template = templateEnv.get_template(TEMPLATE_FILE)
 
         outputText = template.render(scenario_results=scenario_results,
@@ -104,7 +104,7 @@ for version in versions:
                                  % result['details']['sig_test']['duration'])
                     logger.debug("Signaling testing results: %s"
                                  % format_result)
-                except:
+                except Exception:
                     logger.error("Data badly formatted")
                 logger.debug("----------------------------------------")
 
@@ -112,7 +112,7 @@ for version in versions:
         templateEnv = jinja2.Environment(loader=templateLoader,
                                          autoescape=True)
 
-        TEMPLATE_FILE = "./functest/template/index-vims-tmpl.html"
+        TEMPLATE_FILE = "./reporting/functest/template/index-vims-tmpl.html"
         template = templateEnv.get_template(TEMPLATE_FILE)
 
         outputText = template.render(scenario_results=scenario_results,
@@ -23,7 +23,7 @@ reportingDate = datetime.datetime.now().strftime("%Y-%m-%d %H:%M")
 
 logger.info("*******************************************")
 logger.info("*   Generating reporting scenario status  *")
-logger.info("*   Data retention = %s days              *" % PERIOD)
+logger.info("*   Data retention = {} days              *".format(PERIOD))
 logger.info("*                                         *")
 logger.info("*******************************************")
 
@@ -33,7 +33,8 @@ def prepare_profile_file(version):
     if not os.path.exists(profile_dir):
         os.makedirs(profile_dir)
 
-    profile_file = '{}/scenario_history.txt'.format(profile_dir, version)
+    profile_file = "{}/{}/scenario_history.txt".format(profile_dir,
+                                                       version)
     if not os.path.exists(profile_file):
         with open(profile_file, 'w') as f:
             info = 'date,scenario,installer,details,score\n'
@@ -77,7 +78,7 @@ def render_html(prof_results, installer, version):
     template_env = jinja2.Environment(loader=template_loader,
                                       autoescape=True)
 
-    template_file = "./qtip/template/index-status-tmpl.html"
+    template_file = "./reporting/qtip/template/index-status-tmpl.html"
     template = template_env.get_template(template_file)
 
     render_outcome = template.render(prof_results=prof_results,
@@ -106,5 +107,6 @@ def render_reporter():
         rp_utils.generate_csv(profile_file)
         logger.info("CSV generated...")
 
+
 if __name__ == '__main__':
     render_reporter()
@@ -131,7 +131,7 @@ for version in versions:
         templateEnv = jinja2.Environment(loader=templateLoader,
                                          autoescape=True)
 
-        TEMPLATE_FILE = "./storperf/template/index-status-tmpl.html"
+        TEMPLATE_FILE = "./reporting/storperf/template/index-status-tmpl.html"
         template = templateEnv.get_template(TEMPLATE_FILE)
 
         outputText = template.render(scenario_results=scenario_result_criteria,
diff --git a/utils/test/reporting/reporting/tests/unit/utils/__init__.py b/utils/test/reporting/reporting/tests/unit/utils/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
@@ -10,7 +10,7 @@
 import logging
 import unittest
 
-from utils import reporting_utils
+from reporting.utils import reporting_utils
 
 
 class reportingUtilsTesting(unittest.TestCase):
@@ -20,10 +20,9 @@ class reportingUtilsTesting(unittest.TestCase):
     def setUp(self):
         self.test = reporting_utils
 
-    def test_getConfig(self):
-        self.assertEqual(self.test.get_config("general.period"), 10)
-# TODO
-# ...
+    def test_foo(self):
+        self.assertTrue(0 < 1)
+
 
 if __name__ == "__main__":
     unittest.main(verbosity=2)
diff --git a/utils/test/reporting/reporting/utils/__init__.py b/utils/test/reporting/reporting/utils/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
@@ -95,7 +95,7 @@ def getApiResults(case, installer, scenario, version):
         k = response.read()
         results = json.loads(k)
     except URLError as e:
-        print('No kittez. Got an error code:', e)
+        print 'No kittez. Got an error code:'.format(e)
 
     return results
 
@@ -124,19 +124,21 @@ def getScenarios(case, installer, version):
         k = response.read()
         results = json.loads(k)
         test_results = results['results']
-
-        page = results['pagination']['total_pages']
-        if page > 1:
-            test_results = []
-            for i in range(1, page + 1):
-                url_page = url + "&page=" + str(i)
-                request = Request(url_page)
-                response = urlopen(request)
-                k = response.read()
-                results = json.loads(k)
-                test_results += results['results']
+        try:
+            page = results['pagination']['total_pages']
+            if page > 1:
+                test_results = []
+                for i in range(1, page + 1):
+                    url_page = url + "&page=" + str(i)
+                    request = Request(url_page)
+                    response = urlopen(request)
+                    k = response.read()
+                    results = json.loads(k)
+                    test_results += results['results']
+        except KeyError:
+            print ('No pagination detected')
     except URLError as err:
-        print('Got an error code:', err)
+        print 'Got an error code: {}'.format(err)
 
     if test_results is not None:
         test_results.reverse()
@@ -152,7 +154,7 @@ def getScenarios(case, installer, version):
             exclude_noha = get_config('functest.exclude_noha')
             if ((exclude_virtual_pod and "virtual" in r['pod_name']) or
                     (exclude_noha and "noha" in r['scenario'])):
-                print("exclude virtual pod results...")
+                print "exclude virtual pod results..."
             else:
                 scenario_results[r['scenario']].append(r)
 
@@ -183,7 +185,7 @@ def getScenarioStatus(installer, version):
         results = json.loads(k)
         test_results = results['results']
     except URLError as e:
-        print('Got an error code:', e)
+        print 'Got an error code: {}'.format(e)
 
     scenario_results = {}
     result_dict = {}
@@ -223,7 +225,7 @@ def getQtipResults(version, installer):
         response.close()
         results = json.loads(k)['results']
     except URLError as err:
-        print('Got an error code:', err)
+        print 'Got an error code: {}'.format(err)
 
     result_dict = {}
     if results:
@@ -245,7 +247,7 @@ def getNbtestOk(results):
                 if "PASS" in v:
                     nb_test_ok += 1
             except:
-                print("Cannot retrieve test status")
+                print "Cannot retrieve test status"
     return nb_test_ok
 
 
@@ -320,7 +322,7 @@ def getJenkinsUrl(build_tag):
                   "/" + str(build_id[0]))
         jenkins_url = url_base + url_id + "/console"
     except:
-        print('Impossible to get jenkins url:')
+        print 'Impossible to get jenkins url:'
 
     if "jenkins-" not in build_tag:
         jenkins_url = None
@@ -333,7 +335,7 @@ def getScenarioPercent(scenario_score, scenario_criteria):
     try:
         score = float(scenario_score) / float(scenario_criteria) * 100
     except:
-        print('Impossible to calculate the percentage score')
+        print 'Impossible to calculate the percentage score'
     return score
 
 
@@ -419,7 +421,7 @@ def get_percent(four_list, ten_list):
 
 def _test():
     status = getScenarioStatus("compass", "master")
-    print("status:++++++++++++++++++++++++")
+    print "status:++++++++++++++++++++++++"
     print(json.dumps(status, indent=4))
 
 
@@ -456,6 +458,6 @@ def export_pdf(pdf_path, pdf_doc_name):
     try:
         pdfkit.from_file(pdf_path, pdf_doc_name)
     except IOError:
-        print("Error but pdf generated anyway...")
+        print "Error but pdf generated anyway..."
     except:
-        print("impossible to generate PDF")
+        print "impossible to generate PDF"
diff --git a/utils/test/reporting/reporting/yardstick/__init__.py b/utils/test/reporting/reporting/yardstick/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
@@ -106,7 +106,7 @@ for version in versions:
         templateEnv = jinja2.Environment(loader=templateLoader,
                                          autoescape=True)
 
-        TEMPLATE_FILE = "./yardstick/template/index-status-tmpl.html"
+        TEMPLATE_FILE = "./reporting/yardstick/template/index-status-tmpl.html"
         template = templateEnv.get_template(TEMPLATE_FILE)
 
         outputText = template.render(scenario_results=scenario_result_criteria,
diff --git a/utils/test/reporting/requirements.txt b/utils/test/reporting/requirements.txt
new file mode 100644 (file)
index 0000000..344064d
--- /dev/null
@@ -0,0 +1,7 @@
+pdfkit>=0.6.1 # MIT
+wkhtmltopdf-pack>=0.12.3 # MIT
+PyYAML>=3.10.0 # MIT
+simplejson>=2.2.0 # MIT
+Jinja2!=2.9.0,!=2.9.1,!=2.9.2,!=2.9.3,!=2.9.4,>=2.8 # BSD License (3 clause)
+requests!=2.12.2,>=2.10.0 # Apache-2.0
+tornado>=4.4.2 # Apache-2.0
index 8c674ce..b83b550 100755 (executable)
@@ -1,44 +1,3 @@
 #!/bin/bash
-set -o errexit
-set -o pipefail
-
-
-# Get script directory
-SCRIPTDIR=`dirname $0`
-
-# Creating virtual environment
-if [ ! -z $VIRTUAL_ENV ]; then
-    venv=$VIRTUAL_ENV
-else
-    venv=$SCRIPTDIR/.venv
-    virtualenv $venv
-fi
-
-source $venv/bin/activate
-
-export CONFIG_REPORTING_YAML=$SCRIPTDIR/reporting.yaml
-
-# ***************
-# Run unit tests
-# ***************
-echo "Running unit tests..."
-
-# install python packages
-easy_install -U setuptools
-easy_install -U pip
-pip install -r $SCRIPTDIR/docker/requirements.pip
-pip install -e $SCRIPTDIR
-
-python $SCRIPTDIR/setup.py develop
-
-# unit tests
-# TODO: remove cover-erase
-# To be deleted when all functest packages will be listed
-nosetests --with-xunit \
-         --cover-package=$SCRIPTDIR/utils \
-         --with-coverage \
-         --cover-xml \
-         $SCRIPTDIR/tests/unit
-rc=$?
-
-deactivate
+tox
+exit $?
diff --git a/utils/test/reporting/setup.cfg b/utils/test/reporting/setup.cfg
new file mode 100644 (file)
index 0000000..9543945
--- /dev/null
@@ -0,0 +1,12 @@
+[metadata]
+name = reporting
+version = 1
+home-page = https://wiki.opnfv.org/display/testing
+
+[files]
+packages =
+    reporting
+    api
+scripts =
+    docker/reporting.sh
+    docker/web_server.sh
index 627785e..a52d905 100644 (file)
@@ -1,22 +1,24 @@
-##############################################################################
+#!/usr/bin/env python
+
+# Copyright (c) 2017 Orange 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 setuptools import setup, find_packages
+# pylint: disable=missing-docstring
+
+import setuptools
 
+# In python < 2.7.4, a lazy loading of package `pbr` will break
+# setuptools if some other modules registered functions in `atexit`.
+# solution from: http://bugs.python.org/issue15881#msg170215
+try:
+    import multiprocessing  # noqa
+except ImportError:
+    pass
 
-setup(
-    name="reporting",
-    version="master",
-    packages=find_packages(),
-    include_package_data=True,
-    package_data={
-    },
-    url="https://www.opnfv.org",
-    install_requires=["coverage==4.1",
-                      "mock==1.3.0",
-                      "nose==1.3.7"],
-)
+setuptools.setup(
+    setup_requires=['pbr>=1.8'],
+    pbr=True)
diff --git a/utils/test/reporting/test-requirements.txt b/utils/test/reporting/test-requirements.txt
new file mode 100644 (file)
index 0000000..738f508
--- /dev/null
@@ -0,0 +1,5 @@
+coverage>=4.0 # Apache-2.0
+mock>=2.0 # BSD
+nose # LGPL
+flake8<2.6.0,>=2.5.4 # MIT
+pylint==1.4.5 # GPLv2
diff --git a/utils/test/reporting/tox.ini b/utils/test/reporting/tox.ini
new file mode 100644 (file)
index 0000000..2df5030
--- /dev/null
@@ -0,0 +1,27 @@
+[tox]
+envlist = pep8,pylint,py27
+
+[testenv]
+usedevelop = True
+deps =
+  -r{toxinidir}/requirements.txt
+  -r{toxinidir}/test-requirements.txt
+commands = nosetests --with-xunit \
+  --with-coverage \
+  --cover-tests \
+  --cover-package=reporting \
+  --cover-xml \
+  --cover-html \
+  reporting/tests/unit
+
+[testenv:pep8]
+basepython = python2.7
+commands = flake8
+
+[testenv:pylint]
+basepython = python2.7
+whitelist_externals = bash
+commands =
+  bash -c "\
+  pylint --disable=locally-disabled reporting| \
+    tee pylint.out | sed -ne '/Raw metrics/,//p'"
index bb31ab0..5f5b861 100644 (file)
         .module('testapiApp')
         .config(configureRoutes);
 
+    angular
+        .module('testapiApp')
+        .directive('dynamicModel', ['$compile', '$parse', function ($compile, $parse) {
+            return {
+                restrict: 'A',
+                terminal: true,
+                priority: 100000,
+                link: function (scope, elem) {
+                    var name = $parse(elem.attr('dynamic-model'))(scope);
+                    elem.removeAttr('dynamic-model');
+                    elem.attr('ng-model', name);
+                    $compile(elem)(scope);
+                }
+            };
+        }]);
+
     configureRoutes.$inject = ['$stateProvider', '$urlRouterProvider'];
 
     /**
                 url: '/about',
                 templateUrl: 'testapi-ui/components/about/about.html'
             }).
-            state('guidelines', {
-                url: '/guidelines',
-                templateUrl: 'testapi-ui/components/guidelines/guidelines.html',
-                controller: 'GuidelinesController as ctrl'
+            state('pods', {
+                url: '/pods',
+                templateUrl: 'testapi-ui/components/pods/pods.html',
+                controller: 'PodsController as ctrl'
             }).
             state('communityResults', {
                 url: '/community_results',
diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/guidelines.html b/utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/guidelines.html
deleted file mode 100644 (file)
index 1dd39ff..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-<h3>OpenStack Powered&#8482; Guidelines</h3>
-
-<!-- Guideline Filters -->
-<div class="row">
-    <div class="col-md-3">
-        <strong>Version:</strong>
-        <!-- Slicing the version file name here gets rid of the '.json' file extension -->
-        <select ng-model="ctrl.version"
-                ng-change="ctrl.update()"
-                class="form-control"
-                ng-options="versionFile.slice(0,-5) for versionFile in ctrl.versionList">
-        </select>
-    </div>
-    <div class="col-md-4">
-        <strong>Target Program:</strong>
-        <span class="program-about"><a target="_blank" href="http://www.openstack.org/brand/interop/">About</a></span>
-        <select ng-model="ctrl.target" class="form-control" ng-change="ctrl.updateTargetCapabilities()">
-            <option value="platform">OpenStack Powered Platform</option>
-            <option value="compute">OpenStack Powered Compute</option>
-            <option value="object">OpenStack Powered Object Storage</option>
-        </select>
-    </div>
-</div>
-
-<br />
-<div ng-if="ctrl.guidelines">
-    <strong>Guideline Status:</strong>
-    {{ctrl.guidelines.status | capitalize}}
-</div>
-
-<div ng-show="ctrl.guidelines">
-    <strong>Corresponding OpenStack Releases:</strong>
-    <ul class="list-inline">
-        <li ng-repeat="release in ctrl.guidelines.releases">
-            {{release | capitalize}}
-        </li>
-    </ul>
-</div>
-
-<strong>Capability Status:</strong>
-<div class="checkbox">
-    <label>
-    <input type="checkbox" ng-model="ctrl.status.required">
-    <span class="required">Required</span>
-    </label>
-    <label>
-    <input type="checkbox" ng-model="ctrl.status.advisory">
-    <span class="advisory">Advisory</span>
-    </label>
-    <label>
-    <input type="checkbox" ng-model="ctrl.status.deprecated">
-    <span class="deprecated">Deprecated</span>
-    </label>
-    <label>
-    <input type="checkbox" ng-model="ctrl.status.removed">
-    <span class="removed">Removed</span>
-    </label>
-    <a class="test-list-dl pull-right"
-       title="Get a test list for capabilities matching selected statuses."
-       ng-click="ctrl.openTestListModal()">
-
-        Test List <span class="glyphicon glyphicon-file"></span>
-    </a>
-</div>
-<!-- End Capability Filters -->
-
-<p><small>Tests marked with <span class="glyphicon glyphicon-flag text-warning"></span> are tests flagged by Interop Working Group.</small></p>
-
-<!-- Loading animation divs -->
-<div cg-busy="{promise:ctrl.versionsRequest,message:'Loading versions'}"></div>
-<div cg-busy="{promise:ctrl.capsRequest,message:'Loading capabilities'}"></div>
-
-<!-- Get the version-specific template -->
-<div ng-include src="ctrl.detailsTemplate"></div>
-
-<div ng-show="ctrl.showError" class="alert alert-danger" role="alert">
-    <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
-    <span class="sr-only">Error:</span>
-    {{ctrl.error}}
-</div>
diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/guidelinesController.js b/utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/guidelinesController.js
deleted file mode 100644 (file)
index a6f4258..0000000
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-(function () {
-    'use strict';
-
-    angular
-        .module('testapiApp')
-        .controller('GuidelinesController', GuidelinesController);
-
-    GuidelinesController.$inject = ['$http', '$uibModal', 'testapiApiUrl'];
-
-    /**
-     * TestAPI Guidelines Controller
-     * This controller is for the '/guidelines' page where a user can browse
-     * through tests belonging to Interop WG defined capabilities.
-     */
-    function GuidelinesController($http, $uibModal, testapiApiUrl) {
-        var ctrl = this;
-
-        ctrl.getVersionList = getVersionList;
-        ctrl.update = update;
-        ctrl.updateTargetCapabilities = updateTargetCapabilities;
-        ctrl.filterStatus = filterStatus;
-        ctrl.getObjectLength = getObjectLength;
-        ctrl.openTestListModal = openTestListModal;
-
-        /** The target OpenStack marketing program to show capabilities for. */
-        ctrl.target = 'platform';
-
-        /** The various possible capability statuses. */
-        ctrl.status = {
-            required: true,
-            advisory: false,
-            deprecated: false,
-            removed: false
-        };
-
-        /**
-         * The template to load for displaying capability details.
-         */
-        ctrl.detailsTemplate = 'components/guidelines/partials/' +
-                               'guidelineDetails.html';
-
-        /**
-         * Retrieve an array of available guideline files from the TestAPI
-         * API server, sort this array reverse-alphabetically, and store it in
-         * a scoped variable. The scope's selected version is initialized to
-         * the latest (i.e. first) version here as well. After a successful API
-         * call, the function to update the capabilities is called.
-         * Sample API return array: ["2015.03.json", "2015.04.json"]
-         */
-        function getVersionList() {
-            var content_url = testapiApiUrl + '/guidelines';
-            ctrl.versionsRequest =
-                $http.get(content_url).success(function (data) {
-                    ctrl.versionList = data.sort().reverse();
-                    // Default to the first approved guideline which is expected
-                    // to be at index 1.
-                    ctrl.version = ctrl.versionList[1];
-                    ctrl.update();
-                }).error(function (error) {
-                    ctrl.showError = true;
-                    ctrl.error = 'Error retrieving version list: ' +
-                        angular.toJson(error);
-                });
-        }
-
-        /**
-         * This will contact the TestAPI API server to retrieve the JSON
-         * content of the guideline file corresponding to the selected
-         * version.
-         */
-        function update() {
-            var content_url = testapiApiUrl + '/guidelines/' + ctrl.version;
-            ctrl.capsRequest =
-                $http.get(content_url).success(function (data) {
-                    ctrl.guidelines = data;
-                    ctrl.updateTargetCapabilities();
-                }).error(function (error) {
-                    ctrl.showError = true;
-                    ctrl.guidelines = null;
-                    ctrl.error = 'Error retrieving guideline content: ' +
-                        angular.toJson(error);
-                });
-        }
-
-        /**
-         * This will update the scope's 'targetCapabilities' object with
-         * capabilities belonging to the selected OpenStack marketing program
-         * (programs typically correspond to 'components' in the Interop WG
-         * schema). Each capability will have its status mapped to it.
-         */
-        function updateTargetCapabilities() {
-            ctrl.targetCapabilities = {};
-            var components = ctrl.guidelines.components;
-            var targetCaps = ctrl.targetCapabilities;
-
-            // The 'platform' target is comprised of multiple components, so
-            // we need to get the capabilities belonging to each of its
-            // components.
-            if (ctrl.target === 'platform') {
-                var platform_components = ctrl.guidelines.platform.required;
-
-                // This will contain status priority values, where lower
-                // values mean higher priorities.
-                var statusMap = {
-                    required: 1,
-                    advisory: 2,
-                    deprecated: 3,
-                    removed: 4
-                };
-
-                // For each component required for the platform program.
-                angular.forEach(platform_components, function (component) {
-                    // Get each capability list belonging to each status.
-                    angular.forEach(components[component],
-                        function (caps, status) {
-                            // For each capability.
-                            angular.forEach(caps, function(cap) {
-                                // If the capability has already been added.
-                                if (cap in targetCaps) {
-                                    // If the status priority value is less
-                                    // than the saved priority value, update
-                                    // the value.
-                                    if (statusMap[status] <
-                                        statusMap[targetCaps[cap]]) {
-                                        targetCaps[cap] = status;
-                                    }
-                                }
-                                else {
-                                    targetCaps[cap] = status;
-                                }
-                            });
-                        });
-                });
-            }
-            else {
-                angular.forEach(components[ctrl.target],
-                    function (caps, status) {
-                        angular.forEach(caps, function(cap) {
-                            targetCaps[cap] = status;
-                        });
-                    });
-            }
-        }
-
-        /**
-         * This filter will check if a capability's status corresponds
-         * to a status that is checked/selected in the UI. This filter
-         * is meant to be used with the ng-repeat directive.
-         * @param {Object} capability
-         * @returns {Boolean} True if capability's status is selected
-         */
-        function filterStatus(capability) {
-            var caps = ctrl.targetCapabilities;
-            return (ctrl.status.required &&
-                caps[capability.id] === 'required') ||
-                (ctrl.status.advisory &&
-                caps[capability.id] === 'advisory') ||
-                (ctrl.status.deprecated &&
-                caps[capability.id] === 'deprecated') ||
-                (ctrl.status.removed &&
-                caps[capability.id] === 'removed');
-        }
-
-        /**
-         * This function will get the length of an Object/dict based on
-         * the number of keys it has.
-         * @param {Object} object
-         * @returns {Number} length of object
-         */
-        function getObjectLength(object) {
-            return Object.keys(object).length;
-        }
-
-        /**
-         * This will open the modal that will show a list of all tests
-         * belonging to capabilities with the selected status(es).
-         */
-        function openTestListModal() {
-            $uibModal.open({
-                templateUrl: '/components/guidelines/partials' +
-                        '/testListModal.html',
-                backdrop: true,
-                windowClass: 'modal',
-                animation: true,
-                controller: 'TestListModalController as modal',
-                size: 'lg',
-                resolve: {
-                    version: function () {
-                        return ctrl.version.slice(0, -5);
-                    },
-                    target: function () {
-                        return ctrl.target;
-                    },
-                    status: function () {
-                        return ctrl.status;
-                    }
-                }
-            });
-        }
-
-        ctrl.getVersionList();
-    }
-
-    angular
-        .module('testapiApp')
-        .controller('TestListModalController', TestListModalController);
-
-    TestListModalController.$inject = [
-        '$uibModalInstance', '$http', 'version',
-        'target', 'status', 'testapiApiUrl'
-    ];
-
-    /**
-     * Test List Modal Controller
-     * This controller is for the modal that appears if a user wants to see the
-     * test list corresponding to Interop WG capabilities with the selected
-     * statuses.
-     */
-    function TestListModalController($uibModalInstance, $http, version,
-        target, status, testapiApiUrl) {
-
-        var ctrl = this;
-
-        ctrl.version = version;
-        ctrl.target = target;
-        ctrl.status = status;
-        ctrl.close = close;
-        ctrl.updateTestListString = updateTestListString;
-
-        ctrl.aliases = true;
-        ctrl.flagged = false;
-
-        // Check if the API URL is absolute or relative.
-        if (testapiApiUrl.indexOf('http') > -1) {
-            ctrl.url = testapiApiUrl;
-        }
-        else {
-            ctrl.url = location.protocol + '//' + location.host +
-                testapiApiUrl;
-        }
-
-        /**
-         * This function will close/dismiss the modal.
-         */
-        function close() {
-            $uibModalInstance.dismiss('exit');
-        }
-
-        /**
-         * This function will return a list of statuses based on which ones
-         * are selected.
-         */
-        function getStatusList() {
-            var statusList = [];
-            angular.forEach(ctrl.status, function(value, key) {
-                if (value) {
-                    statusList.push(key);
-                }
-            });
-            return statusList;
-        }
-
-        /**
-         * This will get the list of tests from the API and update the
-         * controller's test list string variable.
-         */
-        function updateTestListString() {
-            var statuses = getStatusList();
-            if (!statuses.length) {
-                ctrl.error = 'No tests matching selected criteria.';
-                return;
-            }
-            ctrl.testListUrl = [
-                ctrl.url, '/guidelines/', ctrl.version, '/tests?',
-                'target=', ctrl.target, '&',
-                'type=', statuses.join(','), '&',
-                'alias=', ctrl.aliases.toString(), '&',
-                'flag=', ctrl.flagged.toString()
-            ].join('');
-            ctrl.testListRequest =
-                $http.get(ctrl.testListUrl).
-                    then(function successCallback(response) {
-                        ctrl.error = null;
-                        ctrl.testListString = response.data;
-                        if (!ctrl.testListString) {
-                            ctrl.testListCount = 0;
-                        }
-                        else {
-                            ctrl.testListCount =
-                                ctrl.testListString.split('\n').length;
-                        }
-                    }, function errorCallback(response) {
-                        ctrl.testListString = null;
-                        ctrl.testListCount = null;
-                        if (angular.isObject(response.data) &&
-                            response.data.message) {
-                            ctrl.error = 'Error retrieving test list: ' +
-                                response.data.message;
-                        }
-                        else {
-                            ctrl.error = 'Unknown error retrieving test list.';
-                        }
-                    });
-        }
-
-        updateTestListString();
-    }
-})();
diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/partials/guidelineDetails.html b/utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/partials/guidelineDetails.html
deleted file mode 100644 (file)
index f020c9a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
-HTML for guidelines page for all OpenStack Powered (TM) guideline schemas
-This expects the JSON data of the guidelines file to be stored in scope
-variable 'guidelines'.
--->
-
-<ol ng-show="ctrl.guidelines" class="capabilities">
-  <li class="capability-list-item" ng-repeat="capability in ctrl.guidelines.capabilities | arrayConverter | filter:ctrl.filterStatus | orderBy:'id'">
-    <span class="capability-name">{{capability.id}}</span><br />
-    <em>{{capability.description}}</em><br />
-    Status: <span class="{{ctrl.targetCapabilities[capability.id]}}">{{ctrl.targetCapabilities[capability.id]}}</span><br />
-    <span ng-if="capability.project">Project: {{capability.project | capitalize}}<br /></span>
-    <a ng-click="showAchievements = !showAchievements">Achievements ({{capability.achievements.length}})</a><br />
-    <ol uib-collapse="!showAchievements" class="list-inline">
-        <li ng-repeat="achievement in capability.achievements">
-            {{achievement}}
-        </li>
-    </ol>
-
-    <a ng-click="showTests = !showTests">Tests ({{ctrl.getObjectLength(capability.tests)}})</a>
-    <ul uib-collapse="!showTests">
-        <li ng-if="ctrl.guidelines.schema === '1.2'" ng-repeat="test in capability.tests">
-           <span ng-class="{'glyphicon glyphicon-flag text-warning': capability.flagged.indexOf(test) > -1}"></span>
-           {{test}}
-        </li>
-        <li ng-if="ctrl.guidelines.schema > '1.2'" ng-repeat="(testName, testDetails) in capability.tests">
-           <span ng-class="{'glyphicon glyphicon-flag text-warning': testDetails.flagged}" title="{{testDetails.flagged.reason}}"></span>
-           {{testName}}
-           <div class="test-detail" ng-if="testDetails.aliases">
-               <strong>Aliases:</strong>
-               <ul><li ng-repeat="alias in testDetails.aliases">{{alias}}</li></ul>
-           </div>
-        </li>
-    </ul>
-  </li>
-</ol>
-
-<div ng-show="ctrl.guidelines" class="criteria">
-    <hr>
-    <h4><a ng-click="showCriteria = !showCriteria">Criteria</a></h4>
-    <div uib-collapse="showCriteria">
-        <ul>
-            <li ng-repeat="(key, criterion) in ctrl.guidelines.criteria">
-                <span class="criterion-name">{{criterion.name}}</span><br />
-                <em>{{criterion.Description}}</em><br />
-                Weight: {{criterion.weight}}
-            </li>
-        </ul>
-    </div>
-</div>
diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html b/utils/test/testapi/3rd_party/static/testapi-ui/components/guidelines/partials/testListModal.html
deleted file mode 100644 (file)
index 5b1d698..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<div class="modal-content">
-    <div class="modal-header">
-        <button type="button" class="close" aria-hidden="true" ng-click="modal.close()">&times;</button>
-        <h4>Test List ({{modal.testListCount}})</h4>
-        <p>Use this test list with <a title="testapi-client" target="_blank"href="https://github.com/openstack/testapi-client">testapi-client</a>
-           to run only tests in the {{modal.version}} OpenStack Powered&#8482; guideline from capabilities with the following statuses:
-        </p>
-        <ul class="list-inline">
-            <li class="required" ng-if="modal.status.required"> Required</li>
-            <li class="advisory" ng-if="modal.status.advisory"> Advisory</li>
-            <li class="deprecated" ng-if="modal.status.deprecated"> Deprecated</li>
-            <li class="removed" ng-if="modal.status.removed"> Removed</li>
-        </ul>
-        <div class="checkbox checkbox-test-list">
-            <label><input type="checkbox" ng-model="modal.aliases" ng-change="modal.updateTestListString()">Aliases</label>
-            <span class="glyphicon glyphicon-info-sign info-hover" aria-hidden="true"
-                  title="Include test aliases as tests may have been renamed over time. It does not hurt to include these."></span>
-            &nbsp;
-            <label><input type="checkbox" ng-model="modal.flagged" ng-change="modal.updateTestListString()">Flagged</label>
-            <span class="glyphicon glyphicon-info-sign info-hover" aria-hidden="true"
-                  title="Include flagged tests.">
-            </span>
-        </div>
-        <p ng-hide="modal.error"> Alternatively, get the test list directly from the API on your CLI:</p>
-        <code ng-hide="modal.error">wget "{{modal.testListUrl}}" -O {{modal.version}}-test-list.txt</code>
-    </div>
-    <div class="modal-body tests-modal-content">
-        <div cg-busy="{promise:modal.testListRequest,message:'Loading'}"></div>
-        <div ng-show="modal.error" class="alert alert-danger" role="alert">
-            <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
-            <span class="sr-only">Error:</span>
-            {{modal.error}}
-        </div>
-        <div class="form-group">
-            <textarea class="form-control" rows="16" id="tests" wrap="off">{{modal.testListString}}</textarea>
-        </div>
-    </div>
-    <div class="modal-footer">
-        <a target="_blank" href="{{modal.testListUrl}}" download="{{modal.version + '-test-list.txt'}}">
-            <button class="btn btn-primary" ng-if="modal.testListCount > 0" type="button">
-                Download
-            </button>
-        </a>
-        <button class="btn btn-primary" type="button" ng-click="modal.close()">Close</button>
-    </div>
-</div>
diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/pods/pods.html b/utils/test/testapi/3rd_party/static/testapi-ui/components/pods/pods.html
new file mode 100644 (file)
index 0000000..cdfcfaf
--- /dev/null
@@ -0,0 +1,71 @@
+<h3>{{ctrl.pageHeader}}</h3>
+<p>{{ctrl.pageParagraph}}</p>
+<div class="row" style="margin-bottom:24px;"></div>
+
+<div class="pod-create">
+    <h4>Create</h4>
+    <div class="row">
+        <div ng-repeat="require in ctrl.createRequirements">
+            <div class="create-pod" style="margin-left:24px;">
+                <p class="input-group">
+                    <label for="cpid">{{require.label|capitalize}}: </label>
+                    <a ng-if="require.type == 'select'">
+                        <select dynamic-model="'ctrl.' + require.label" ng-options="option for option in require.selects"></select>
+                    </a>
+                    <a ng-if="require.type == 'text'">
+                        <input type="text" dynamic-model="'ctrl.' + require.label"/>
+                    </a>
+                    <a ng-if="require.type == 'textarea'">
+                        <textarea rows="2" cols="50" dynamic-model="'ctrl.' + require.label">
+                        </textarea>
+                    </a>
+                </p>
+            </div>
+        </div>
+
+        <div class="col-md-3" style="margin-top:12px; margin-left:8px;">
+            <button type="submit" class="btn btn-primary" ng-click="ctrl.create()">Create</button>
+        </div>
+    </div>
+</div>
+
+<div class="pods-filters" style="margin-top:36px;">
+    <h4>Filters</h4>
+    <div class="row">
+        <div class="col-md-3" style="margin-top:12px; margin-left:8px;">
+            <button type="submit" class="btn btn-primary" ng-click="ctrl.update()">Filter</button>
+            <button type="submit" class="btn btn-primary btn-danger" ng-click="ctrl.clearFilters()">Clear</button>
+        </div>
+    </div>
+</div>
+
+<div cg-busy="{promise:ctrl.authRequest,message:'Loading'}"></div>
+<div cg-busy="{promise:ctrl.podsRequest,message:'Loading'}"></div>
+
+<div ng-show="ctrl.data" class="pods-table" style="margin-top:24px; margin-left:8px;">
+    <table ng-data="ctrl.data.pods" ng-show="ctrl.data" class="table table-striped table-hover">
+        <tbody>
+            <tr ng-repeat-start="(index, pod) in ctrl.data.pods">
+                <td>
+                    <a href="#" ng-click="showPod = !showPod">{{pod.name}}</a>
+                    <div class="show-pod" ng-class="{ 'hidden': ! showPod }" style="margin-left:24px;">
+                        <p>
+                            role: {{pod.role}}<br>
+                            mode: {{pod.mode}}<br>
+                            create_date: {{pod.creation_date}}<br>
+                            details: {{pod.details}}
+                        </p>
+                    </div>
+                </td>
+            </tr>
+            <tr ng-repeat-end=>
+            </tr>
+        </tbody>
+    </table>
+</div>
+
+<div ng-show="ctrl.showError" class="alert alert-danger" role="alert">
+    <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
+    <span class="sr-only">Error:</span>
+    {{ctrl.error}}
+</div>
diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/pods/podsController.js b/utils/test/testapi/3rd_party/static/testapi-ui/components/pods/podsController.js
new file mode 100644 (file)
index 0000000..53e8b1e
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function () {
+    'use strict';
+
+    angular
+        .module('testapiApp')
+        .controller('PodsController', PodsController);
+
+    PodsController.$inject = [
+        '$scope', '$http', '$filter', '$state', 'testapiApiUrl','raiseAlert'
+    ];
+
+    /**
+     * TestAPI Pods Controller
+     * This controller is for the '/pods' page where a user can browse
+     * through pods declared in TestAPI.
+     */
+    function PodsController($scope, $http, $filter, $state, testapiApiUrl,
+        raiseAlert) {
+        var ctrl = this;
+
+        ctrl.url = testapiApiUrl + '/pods';
+
+        ctrl.create = create;
+        ctrl.update = update;
+        ctrl.open = open;
+        ctrl.clearFilters = clearFilters;
+
+        ctrl.roles = ['community-ci', 'production-ci'];
+        ctrl.modes = ['metal', 'virtual'];
+        ctrl.createRequirements = [
+            {label: 'name', type: 'text', required: true},
+            {label: 'mode', type: 'select', selects: ctrl.modes},
+            {label: 'role', type: 'select', selects: ctrl.roles},
+            {label: 'details', type: 'textarea', required: false}
+        ];
+
+        ctrl.name = '';
+        ctrl.role = 'community-ci';
+        ctrl.mode = 'metal';
+        ctrl.details = '';
+
+        ctrl.pageHeader = 'Pods';
+        ctrl.pageParagraph = 'This page is used to create or query pods.';
+
+        /**
+         * This is called when the date filter calendar is opened. It
+         * does some event handling, and sets a scope variable so the UI
+         * knows which calendar was opened.
+         * @param {Object} $event - The Event object
+         * @param {String} openVar - Tells which calendar was opened
+         */
+        function open($event, openVar) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            ctrl[openVar] = true;
+        }
+
+        /**
+         * This function will clear all filters and update the results
+         * listing.
+         */
+        function clearFilters() {
+            ctrl.update();
+        }
+
+        /**
+         * This will contact the TestAPI to create a new pod.
+         */
+        function create() {
+            ctrl.showError = false;
+            var pods_url = ctrl.url;
+            var body = {
+                name: ctrl.name,
+                mode: ctrl.mode,
+                role: ctrl.role,
+                details: ctrl.details
+            };
+
+            ctrl.podsRequest =
+                $http.post(pods_url, body).error(function (error) {
+                    ctrl.showError = true;
+                    ctrl.error =
+                        'Error creating the new pod from server: ' +
+                        angular.toJson(error);
+                });
+        }
+
+        /**
+         * This will contact the TestAPI to get a listing of declared pods.
+         */
+        function update() {
+            ctrl.showError = false;
+            ctrl.podsRequest =
+                $http.get(ctrl.url).success(function (data) {
+                    ctrl.data = data;
+                }).error(function (error) {
+                    ctrl.data = null;
+                    ctrl.showError = true;
+                    ctrl.error =
+                        'Error retrieving pods from server: ' +
+                        angular.toJson(error);
+                });
+        }
+    }
+})();
index 46ccc61..2d7399f 100644 (file)
@@ -40,7 +40,7 @@
         <script src="testapi-ui/shared/header/headerController.js"></script>
         <script src="testapi-ui/shared/alerts/alertModalFactory.js"></script>
         <script src="testapi-ui/shared/alerts/confirmModalFactory.js"></script>
-        <script src="testapi-ui/components/guidelines/guidelinesController.js"></script>
+        <script src="testapi-ui/components/pods/podsController.js"></script>
         <script src="testapi-ui/components/results/resultsController.js"></script>
         <script src="testapi-ui/components/results-report/resultsReportController.js"></script>
         <script src="testapi-ui/components/profile/profileController.js"></script>
index 85c33b6..f5b2414 100644 (file)
@@ -17,7 +17,7 @@ TestAPI
           <ul class="nav navbar-nav">
             <li ng-class="{ active: header.isActive('/')}"><a ui-sref="home">Home</a></li>
             <li ng-class="{ active: header.isActive('/about')}"><a ui-sref="about">About</a></li>
-            <li ng-class="{ active: header.isActive('/guidelines')}"><a ui-sref="guidelines">OPNFV Powered&#8482; Guidelines</a></li>
+            <li ng-class="{ active: header.isActive('/pods')}"><a ui-sref="pods">Pods</a></li>
             <li ng-class="{ active: header.isActive('/community_results')}"><a ui-sref="communityResults">Community Results</a></li>
             <!--
             <li ng-class="{ active: header.isCatalogActive('public')}" class="dropdown" uib-dropdown>
index 4f1be7d..b14bc24 100755 (executable)
@@ -8,7 +8,6 @@ fi
 
 if [ "$base_url" != "" ]; then
     sudo crudini --set --existing $FILE api url $base_url/api/v1
-    sudo crudini --set --existing $FILE swagger base_url $base_url
     sudo crudini --set --existing $FILE ui url $base_url
     sudo echo "{\"testapiApiUrl\": \"$base_url/api/v1\"}" > \
         /usr/local/lib/python2.7/dist-packages/opnfv_testapi/static/testapi-ui/config.json
index 435188d..1ec899f 100644 (file)
@@ -18,9 +18,6 @@ results_per_page = 20
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
-
 [ui]
 url = http://localhost:8000
 
index a5ac5eb..50ac049 100644 (file)
@@ -37,7 +37,7 @@ from opnfv_testapi.tornado_swagger import swagger
 
 
 def make_app():
-    swagger.docs(base_url=CONF.swagger_base_url,
+    swagger.docs(base_url=CONF.ui_url,
                  static_path=CONF.static_path)
     return swagger.Application(
         url_mappings.mappings,
index fda2a09..be7f2b9 100644 (file)
@@ -12,5 +12,5 @@ port = 8000
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index 77cc6c6..c81c6c5 100644 (file)
@@ -13,5 +13,5 @@ port = 8000
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index 9988fc0..a9ed49c 100644 (file)
@@ -7,5 +7,5 @@ port = 8000
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index b3f3276..3a11f9d 100644 (file)
@@ -13,5 +13,5 @@ port = 8000
 debug = True
 authenticate = notboolean
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index d1b752a..8180719 100644 (file)
@@ -13,5 +13,5 @@ port = notint
 debug = True
 authenticate = False
 
-[swagger]
-base_url = http://localhost:8000
+[ui]
+url = http://localhost:8000
index cc8743c..8cfc513 100644 (file)
@@ -12,4 +12,4 @@ def test_config_normal(mocker, config_normal):
     assert CONF.api_port == 8000
     assert CONF.api_debug is True
     assert CONF.api_authenticate is False
-    assert CONF.swagger_base_url == 'http://localhost:8000'
+    assert CONF.ui_url == 'http://localhost:8000'