summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/armband/armband-ci-jobs.yml125
-rw-r--r--jjb/functest/functest-ci-jobs.yml23
-rwxr-xr-xjjb/kvmfornfv/kvmfornfv-upload-artifact.sh7
-rw-r--r--jjb/opnfv/slave-params.yml18
-rw-r--r--prototypes/puppet-infracloud/README.md19
-rw-r--r--utils/test/scripts/create_kibana_dashboards.py548
-rw-r--r--utils/test/scripts/testcases.yaml129
7 files changed, 292 insertions, 577 deletions
diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml
index bffa91d31..f100a46a8 100644
--- a/jjb/armband/armband-ci-jobs.yml
+++ b/jjb/armband/armband-ci-jobs.yml
@@ -22,22 +22,22 @@
# colorado
#--------------------------------
pod:
- - baremetal:
+ - armband-baremetal:
slave-label: armband-baremetal
installer: fuel
<<: *colorado
- - virtual:
+ - armband-virtual:
slave-label: armband-virtual
installer: fuel
<<: *colorado
#--------------------------------
# master
#--------------------------------
- - baremetal:
+ - armband-baremetal:
slave-label: armband-baremetal
installer: fuel
<<: *master
- - virtual:
+ - armband-virtual:
slave-label: armband-virtual
installer: fuel
<<: *master
@@ -63,27 +63,27 @@
scenario:
# HA scenarios
- 'os-nosdn-nofeature-ha':
- auto-trigger-name: 'armband-{installer}-{scenario}-{pod}-{stream}-trigger'
+ auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l2-nofeature-ha':
- auto-trigger-name: 'armband-{installer}-{scenario}-{pod}-{stream}-trigger'
+ auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l3-nofeature-ha':
- auto-trigger-name: 'armband-{installer}-{scenario}-{pod}-{stream}-trigger'
+ auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l2-bgpvpn-ha':
- auto-trigger-name: 'armband-{installer}-{scenario}-{pod}-{stream}-trigger'
+ auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
# NOHA scenarios
- 'os-odl_l2-nofeature-noha':
- auto-trigger-name: 'armband-{installer}-{scenario}-{pod}-{stream}-trigger'
+ auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger'
jobs:
- - 'armband-{installer}-{scenario}-{pod}-daily-{stream}'
- - 'armband-{installer}-deploy-{pod}-daily-{stream}'
+ - '{installer}-{scenario}-{pod}-daily-{stream}'
+ - '{installer}-deploy-{pod}-daily-{stream}'
########################
# job templates
########################
- job-template:
- name: 'armband-{installer}-{scenario}-{pod}-daily-{stream}'
+ name: '{installer}-{scenario}-{pod}-daily-{stream}'
concurrent: false
@@ -96,7 +96,7 @@
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - 'armband-{installer}-os-.*?-{pod}-daily-.*'
+ - '{installer}-os-.*?-{pod}-daily-.*'
block-level: 'NODE'
wrappers:
@@ -120,7 +120,7 @@
builders:
- trigger-builds:
- - project: 'armband-{installer}-deploy-{pod}-daily-{stream}'
+ - project: '{installer}-deploy-{pod}-daily-{stream}'
current-parameters: false
predefined-parameters:
DEPLOY_SCENARIO={scenario}
@@ -137,9 +137,20 @@
build-step-failure-threshold: 'never'
failure-threshold: 'never'
unstable-threshold: 'FAILURE'
+ - trigger-builds:
+ - project: 'yardstick-{installer}-{pod}-daily-{stream}'
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={scenario}
+ block: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
- job-template:
- name: 'armband-{installer}-deploy-{pod}-daily-{stream}'
+ name: '{installer}-deploy-{pod}-daily-{stream}'
concurrent: false
@@ -152,8 +163,8 @@
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - 'armband-{installer}-deploy-{pod}-daily-{stream}'
- - 'armband-{installer}-deploy-generic-daily-.*'
+ - '{installer}-deploy-{pod}-daily-{stream}'
+ - '{installer}-deploy-generic-daily-.*'
block-level: 'NODE'
parameters:
@@ -215,137 +226,137 @@
# Enea Armband CI Baremetal Triggers running against master branch
#-----------------------------------------------------------------
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-ha-baremetal-master-trigger'
+ name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3 * * 1'
+ - timed: '0 3,15 * * 1'
- trigger:
- name: 'armband-fuel-os-nosdn-nofeature-ha-baremetal-master-trigger'
+ name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3 * * 2'
+ - timed: '0 3,15 * * 2'
- trigger:
- name: 'armband-fuel-os-odl_l3-nofeature-ha-baremetal-master-trigger'
+ name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3 * * 3'
+ - timed: '0 3,15 * * 3'
- trigger:
- name: 'armband-fuel-os-odl_l2-bgpvpn-ha-baremetal-master-trigger'
+ name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3 * * 4'
+ - timed: '0 3,15 * * 4'
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-noha-baremetal-master-trigger'
+ name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-master-trigger'
triggers:
- - timed: '0 3 * * 5'
+ - timed: '0 3,15 * * 5'
#----------------------------------------------------------------------
# Enea Armband CI Baremetal Triggers running against colorado branch
#----------------------------------------------------------------------
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-ha-baremetal-colorado-trigger'
+ name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 15 * * 1'
+ - timed: '0 4,16 * * 1'
- trigger:
- name: 'armband-fuel-os-nosdn-nofeature-ha-baremetal-colorado-trigger'
+ name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 15 * * 2'
+ - timed: '0 4,16 * * 2'
- trigger:
- name: 'armband-fuel-os-odl_l3-nofeature-ha-baremetal-colorado-trigger'
+ name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 15 * * 3'
+ - timed: '0 4,16 * * 3'
- trigger:
- name: 'armband-fuel-os-odl_l2-bgpvpn-ha-baremetal-colorado-trigger'
+ name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 15 * * 4'
+ - timed: '0 4,16 * * 4'
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-noha-baremetal-colorado-trigger'
+ name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-colorado-trigger'
triggers:
- - timed: '0 15 * * 5'
+ - timed: '0 4,16 * * 5'
#---------------------------------------------------------------
# Enea Armband CI Virtual Triggers running against master branch
#---------------------------------------------------------------
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-ha-virtual-master-trigger'
+ name: 'fuel-os-odl_l2-nofeature-ha-armband-virtual-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-nosdn-nofeature-ha-virtual-master-trigger'
+ name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l3-nofeature-ha-virtual-master-trigger'
+ name: 'fuel-os-odl_l3-nofeature-ha-armband-virtual-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l2-bgpvpn-ha-virtual-master-trigger'
+ name: 'fuel-os-odl_l2-bgpvpn-ha-armband-virtual-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-noha-virtual-master-trigger'
+ name: 'fuel-os-odl_l2-nofeature-noha-armband-virtual-master-trigger'
triggers:
- timed: ''
#--------------------------------------------------------------------
# Enea Armband CI Virtual Triggers running against colorado branch
#--------------------------------------------------------------------
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-ha-virtual-colorado-trigger'
+ name: 'fuel-os-odl_l2-nofeature-ha-armband-virtual-colorado-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-nosdn-nofeature-ha-virtual-colorado-trigger'
+ name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-colorado-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l3-nofeature-ha-virtual-colorado-trigger'
+ name: 'fuel-os-odl_l3-nofeature-ha-armband-virtual-colorado-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l2-bgpvpn-ha-virtual-colorado-trigger'
+ name: 'fuel-os-odl_l2-bgpvpn-ha-armband-virtual-colorado-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-noha-virtual-colorado-trigger'
+ name: 'fuel-os-odl_l2-nofeature-noha-armband-virtual-colorado-trigger'
triggers:
- timed: ''
#----------------------------------------------------------
# Enea Armband POD 2 Triggers running against master branch
#----------------------------------------------------------
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-ha-arm-pod2-master-trigger'
+ name: 'fuel-os-odl_l2-nofeature-ha-arm-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-nosdn-nofeature-ha-arm-pod2-master-trigger'
+ name: 'fuel-os-nosdn-nofeature-ha-arm-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l3-nofeature-ha-arm-pod2-master-trigger'
+ name: 'fuel-os-odl_l3-nofeature-ha-arm-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l2-bgpvpn-ha-arm-pod2-master-trigger'
+ name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-noha-arm-pod2-master-trigger'
+ name: 'fuel-os-odl_l2-nofeature-noha-arm-pod2-master-trigger'
triggers:
- timed: ''
#---------------------------------------------------------------
# Enea Armband POD 2 Triggers running against colorado branch
#---------------------------------------------------------------
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-ha-arm-pod2-colorado-trigger'
+ name: 'fuel-os-odl_l2-nofeature-ha-arm-pod2-colorado-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-nosdn-nofeature-ha-arm-pod2-colorado-trigger'
+ name: 'fuel-os-nosdn-nofeature-ha-arm-pod2-colorado-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l3-nofeature-ha-arm-pod2-colorado-trigger'
+ name: 'fuel-os-odl_l3-nofeature-ha-arm-pod2-colorado-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l2-bgpvpn-ha-arm-pod2-colorado-trigger'
+ name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod2-colorado-trigger'
triggers:
- timed: ''
- trigger:
- name: 'armband-fuel-os-odl_l2-nofeature-noha-arm-pod2-colorado-trigger'
+ name: 'fuel-os-odl_l2-nofeature-noha-arm-pod2-colorado-trigger'
triggers:
- timed: ''
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 392545093..0f0cabab3 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -96,6 +96,23 @@
slave-label: '{pod}'
installer: apex
<<: *colorado
+# armband CI PODs
+ - armband-baremetal:
+ slave-label: armband-baremetal
+ installer: fuel
+ <<: *master
+ - armband-virtual:
+ slave-label: armband-virtual
+ installer: fuel
+ <<: *master
+ - armband-baremetal:
+ slave-label: armband-baremetal
+ installer: fuel
+ <<: *colorado
+ - armband-virtual:
+ slave-label: armband-virtual
+ installer: fuel
+ <<: *colorado
#--------------------------------
# None-CI PODs
#--------------------------------
@@ -119,7 +136,7 @@
slave-label: '{pod}'
installer: apex
<<: *master
- - arm-pod1:
+ - arm-pod2:
slave-label: '{pod}'
installer: fuel
<<: *master
@@ -143,7 +160,7 @@
slave-label: '{pod}'
installer: fuel
<<: *colorado
- - arm-pod1:
+ - arm-pod2:
slave-label: '{pod}'
installer: fuel
<<: *colorado
@@ -342,4 +359,4 @@
name: functest-exit
builders:
- shell:
- !include-raw: ./functest-exit.sh \ No newline at end of file
+ !include-raw: ./functest-exit.sh
diff --git a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh
index 422626ead..6f8fff3ff 100755
--- a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh
+++ b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh
@@ -35,6 +35,7 @@ esac
echo "OPNFV_ARTIFACT_URL=$GS_UPLOAD_LOCATION"
echo "OPNFV_BUILD_URL=$BUILD_URL"
) > $WORKSPACE/opnfv.properties
+source $WORKSPACE/opnfv.properties
# upload artifacts
gsutil cp -r $WORKSPACE/build_output/* $GS_UPLOAD_LOCATION > $WORKSPACE/gsutil.log 2>&1
@@ -45,11 +46,11 @@ gsutil -m setmeta -r \
# upload metadata file for the artifacts built by daily job
if [[ "$JOB_TYPE" == "daily" ]]; then
gsutil cp $WORKSPACE/opnfv.properties $GS_UPLOAD_LOCATION/opnfv.properties > $WORKSPACE/gsutil.log 2>&1
- gsutil cp $WORKSPACE/opnfv.properties $GS_URL/latest.properties > $WORKSPACE/gsutil.log 2>&1
+ gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > $WORKSPACE/gsutil.log 2>&1
gsutil -m setmeta -r \
-h "Cache-Control:private, max-age=0, no-transform" \
- $GS_UPLOAD_LOCATION/opnfv-${OPNFV_ARTIFACT_VERSION}.properties \
- $GS_URL/latest.properties > /dev/null 2>&1
+ $GS_UPLOAD_LOCATION/opnfv.properties \
+ gs://$GS_URL/latest.properties > /dev/null 2>&1
fi
gsutil ls $GS_UPLOAD_LOCATION > /dev/null 2>&1
diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml
index 0c8435d6e..c7ec6aa9d 100644
--- a/jjb/opnfv/slave-params.yml
+++ b/jjb/opnfv/slave-params.yml
@@ -604,24 +604,6 @@
default: /root/.ssh/id_rsa
description: 'SSH key to use for Apex'
- parameter:
- name: 'arm-pod1-defaults'
- parameters:
- - node:
- name: SLAVE_NAME
- description: 'Slave name on Jenkins'
- allowed-slaves:
- - arm-pod1
- default-slaves:
- - arm-pod1
- - string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: 'Git URL to use on this Jenkins Slave'
- - string:
- name: LAB_CONFIG_URL
- default: ssh://git@git.enea.com/pharos/lab-config
- description: 'Base URI to the configuration directory'
-- parameter:
name: 'arm-pod2-defaults'
parameters:
- node:
diff --git a/prototypes/puppet-infracloud/README.md b/prototypes/puppet-infracloud/README.md
index dd9e7bb9f..37d575c33 100644
--- a/prototypes/puppet-infracloud/README.md
+++ b/prototypes/puppet-infracloud/README.md
@@ -31,7 +31,7 @@ In jumphost, follow that steps:
git clone https://gerrit.opnfv.org/gerrit/releng /opt/releng
-2. Create OpenStack clouds config directory:
+2. Create OpenStack clouds config directory::
mkdir -p /root/.config/openstack
@@ -39,14 +39,23 @@ In jumphost, follow that steps:
cp /opt/releng/prototypes/puppet-infracloud/creds/clouds.yaml /root/.config/openstack/
-4. Install openstack-client:
+4. Install python-dev package as the installation of python-openstackclient depends on it
+
+ apt-get install -y python-dev
+
+5. Install openstack-client. (version 3.2.0 is known to work)::
pip install python-openstackclient
-5. Export the desired cloud::
+6. Update /etc/hosts and add controller00::
+
+ 192.168.122.3 controller00
+ 192.168.122.3 controller00.opnfvlocal controller00
+
+7. Export the desired cloud::
export OS_CLOUD=opnfv
-6. Start using it::
+8. Start using it::
- openstack server list
+ openstack service list
diff --git a/utils/test/scripts/create_kibana_dashboards.py b/utils/test/scripts/create_kibana_dashboards.py
index 73f4ed971..abb9471ac 100644
--- a/utils/test/scripts/create_kibana_dashboards.py
+++ b/utils/test/scripts/create_kibana_dashboards.py
@@ -1,431 +1,32 @@
#! /usr/bin/env python
+import json
import logging
+import urlparse
+
import argparse
+import yaml
+
import shared_utils
-import json
-import urlparse
logger = logging.getLogger('create_kibana_dashboards')
logger.setLevel(logging.DEBUG)
-file_handler = logging.FileHandler('/var/log/{}.log'.format('create_kibana_dashboards'))
+file_handler = logging.FileHandler('./{}.log'.format('create_kibana_dashboards'))
file_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s: %(message)s'))
logger.addHandler(file_handler)
_installers = {'fuel', 'apex', 'compass', 'joid'}
-# see class VisualizationState for details on format
-_testcases = [
- ('functest', 'tempest_smoke_serial',
- [
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.duration"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "tempest_smoke_serial duration",
- "test_family": "VIM"
- }
- },
-
- {
- "metrics": [
- {
- "type": "sum",
- "params": {
- "field": "details.tests"
- }
- },
- {
- "type": "sum",
- "params": {
- "field": "details.failures"
- }
- }
- ],
- "type": "histogram",
- "metadata": {
- "label": "tempest_smoke_serial nr of tests/failures",
- "test_family": "VIM"
- }
- },
-
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.success_percentage"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "tempest_smoke_serial success percentage",
- "test_family": "VIM"
- }
- }
- ]
- ),
-
- ('functest', 'rally_sanity',
- [
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.duration"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "rally_sanity duration",
- "test_family": "VIM"
- }
- },
-
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.tests"
- }
- }
- ],
- "type": "histogram",
- "metadata": {
- "label": "rally_sanity nr of tests",
- "test_family": "VIM"
- }
- },
-
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.success_percentage"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "rally_sanity success percentage",
- "test_family": "VIM"
- }
- }
- ]
- ),
-
- ('functest', 'vping_ssh',
- [
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.duration"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "vPing duration",
- "test_family": "VIM"
- }
- }
- ]
- ),
-
- ('functest', 'vping_userdata',
- [
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.duration"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "vPing_userdata duration",
- "test_family": "VIM"
- }
- }
- ]
- ),
-
- ('functest', 'odl',
- [
- {
- "metrics": [
- {
- "type": "sum",
- "params": {
- "field": "details.tests"
- }
- },
- {
- "type": "sum",
- "params": {
- "field": "details.failures"
- }
- }
- ],
- "type": "histogram",
- "metadata": {
- "label": "ODL nr of tests/failures",
- "test_family": "Controller"
- }
- },
-
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.success_percentage"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "ODL success percentage",
- "test_family": "Controller"
- }
- }
- ]
- ),
-
- ('functest', 'onos',
- [
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.FUNCvirNet.duration"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "ONOS FUNCvirNet duration",
- "test_family": "Controller"
- }
- },
-
- {
- "metrics": [
- {
- "type": "sum",
- "params": {
- "field": "details.FUNCvirNet.tests"
- }
- },
- {
- "type": "sum",
- "params": {
- "field": "details.FUNCvirNet.failures"
- }
- }
- ],
- "type": "histogram",
- "metadata": {
- "label": "ONOS FUNCvirNet nr of tests/failures",
- "test_family": "Controller"
- }
- },
-
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.FUNCvirNetL3.duration"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "ONOS FUNCvirNetL3 duration",
- "test_family": "Controller"
- }
- },
-
- {
- "metrics": [
- {
- "type": "sum",
- "params": {
- "field": "details.FUNCvirNetL3.tests"
- }
- },
- {
- "type": "sum",
- "params": {
- "field": "details.FUNCvirNetL3.failures"
- }
- }
- ],
- "type": "histogram",
- "metadata": {
- "label": "ONOS FUNCvirNetL3 nr of tests/failures",
- "test_family": "Controller"
- }
- }
- ]
- ),
-
- ('functest', 'vims',
- [
- {
- "metrics": [
- {
- "type": "sum",
- "params": {
- "field": "details.sig_test.tests"
- }
- },
- {
- "type": "sum",
- "params": {
- "field": "details.sig_test.failures"
- }
- },
- {
- "type": "sum",
- "params": {
- "field": "details.sig_test.passed"
- }
- },
- {
- "type": "sum",
- "params": {
- "field": "details.sig_test.skipped"
- }
- }
- ],
- "type": "histogram",
- "metadata": {
- "label": "vIMS nr of tests/failures/passed/skipped",
- "test_family": "Features"
- }
- },
-
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.vIMS.duration"
- }
- },
- {
- "type": "avg",
- "params": {
- "field": "details.orchestrator.duration"
- }
- },
- {
- "type": "avg",
- "params": {
- "field": "details.sig_test.duration"
- }
- }
- ],
- "type": "histogram",
- "metadata": {
- "label": "vIMS/ochestrator/test duration",
- "test_family": "Features"
- }
- }
- ]
- ),
-
- ('promise', 'promise',
- [
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.duration"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "promise duration",
- "test_family": "Features"
- }
- },
-
- {
- "metrics": [
- {
- "type": "sum",
- "params": {
- "field": "details.tests"
- }
- },
- {
- "type": "sum",
- "params": {
- "field": "details.failures"
- }
- }
- ],
- "type": "histogram",
- "metadata": {
- "label": "promise nr of tests/failures",
- "test_family": "Features"
- }
- }
- ]
- ),
-
- ('doctor', 'doctor-notification',
- [
- {
- "metrics": [
- {
- "type": "avg",
- "params": {
- "field": "details.duration"
- }
- }
- ],
- "type": "line",
- "metadata": {
- "label": "doctor-notification duration",
- "test_family": "Features"
- }
- }
- ]
- )
-]
-
class KibanaDashboard(dict):
- def __init__(self, project_name, case_name, installer, pod, scenarios, visualization_detail):
+ def __init__(self, project_name, case_name, family, installer, pod, scenarios, visualization):
super(KibanaDashboard, self).__init__()
self.project_name = project_name
self.case_name = case_name
+ self.family = family
self.installer = installer
self.pod = pod
self.scenarios = scenarios
- self.visualization_detail = visualization_detail
+ self.visualization = visualization
self._visualization_title = None
self._kibana_visualizations = []
self._kibana_dashboard = None
@@ -439,7 +40,7 @@ class KibanaDashboard(dict):
self.installer,
self.pod,
scenario,
- self.visualization_detail))
+ self.visualization))
self._visualization_title = self._kibana_visualizations[0].vis_state_title
@@ -512,7 +113,15 @@ class KibanaDashboard(dict):
},
separators=(',', ':'))
}
- self['metadata'] = self.visualization_detail['metadata']
+
+ label = self.case_name
+ if 'label' in self.visualization:
+ label += " %s" % self.visualization.get('label')
+ label += " %s" % self.visualization.get('name')
+ self['metadata'] = {
+ "label": label,
+ "test_family": self.family
+ }
def _publish(self):
url = urlparse.urljoin(base_elastic_url, '/.kibana/dashboard/{}'.format(self.id))
@@ -546,58 +155,21 @@ class KibanaSearchSourceJSON(dict):
class VisualizationState(dict):
- def __init__(self, input_dict):
- """
- dict structure:
- {
- "metrics":
- [
- {
- "type": type, # default sum
- "params": {
- "field": field # mandatory, no default
- },
- {metric2}
- ],
- "segments":
- [
- {
- "type": type, # default date_histogram
- "params": {
- "field": field # default start_date
- },
- {segment2}
- ],
- "type": type, # default area
- "mode": mode, # default grouped for type 'histogram', stacked for other types
- "metadata": {
- "label": "tempest_smoke_serial duration",# mandatory, no default
- "test_family": "VIM" # mandatory, no default
- }
- }
-
- default modes:
- type histogram: grouped
- type area: stacked
-
- :param input_dict:
- :return:
- """
+ def __init__(self, visualization):
super(VisualizationState, self).__init__()
- metrics = input_dict['metrics']
- segments = [] if 'segments' not in input_dict else input_dict['segments']
-
- graph_type = 'area' if 'type' not in input_dict else input_dict['type']
- self['type'] = graph_type
-
- if 'mode' not in input_dict:
- if graph_type == 'histogram':
- mode = 'grouped'
- else:
- # default
- mode = 'stacked'
+ name = visualization.get('name')
+ fields = visualization.get('fields')
+
+ if name == 'tests_failures':
+ mode = 'grouped'
+ metric_type = 'sum'
+ self['type'] = 'histogram'
else:
- mode = input_dict['mode']
+ # duration or success_percentage
+ mode = 'stacked'
+ metric_type = 'avg'
+ self['type'] = 'line'
+
self['params'] = {
"shareYAxis": True,
"addTooltip": True,
@@ -616,35 +188,18 @@ class VisualizationState(dict):
self['aggs'] = []
i = 1
- for metric in metrics:
+ for field in fields:
self['aggs'].append({
"id": str(i),
- "type": 'sum' if 'type' not in metric else metric['type'],
+ "type": metric_type,
"schema": "metric",
"params": {
- "field": metric['params']['field']
+ "field": field.get('field')
}
})
i += 1
- if len(segments) > 0:
- for segment in segments:
- self['aggs'].append({
- "id": str(i),
- "type": 'date_histogram' if 'type' not in segment else segment['type'],
- "schema": "metric",
- "params": {
- "field": "start_date" if ('params' not in segment or 'field' not in segment['params'])
- else segment['params']['field'],
- "interval": "auto",
- "customInterval": "2h",
- "min_doc_count": 1,
- "extended_bounds": {}
- }
- })
- i += 1
- else:
- self['aggs'].append({
+ self['aggs'].append({
"id": str(i),
"type": 'date_histogram',
"schema": "segment",
@@ -663,7 +218,7 @@ class VisualizationState(dict):
class KibanaVisualization(dict):
- def __init__(self, project_name, case_name, installer, pod, scenario, detail):
+ def __init__(self, project_name, case_name, installer, pod, scenario, visualization):
"""
We need two things
1. filter created from
@@ -679,7 +234,7 @@ class KibanaVisualization(dict):
:return:
"""
super(KibanaVisualization, self).__init__()
- vis_state = VisualizationState(detail)
+ vis_state = VisualizationState(visualization)
self.vis_state_title = vis_state['title']
self['title'] = '{} {} {} {} {} {}'.format(project_name,
case_name,
@@ -752,13 +307,25 @@ def construct_dashboards():
:return: list of KibanaDashboards
"""
kibana_dashboards = []
- for project_name, case_name, visualization_details in _testcases:
- for installer in _installers:
- pods_and_scenarios = _get_pods_and_scenarios(project_name, case_name, installer)
- for visualization_detail in visualization_details:
- for pod, scenarios in pods_and_scenarios.iteritems():
- kibana_dashboards.append(KibanaDashboard(project_name, case_name, installer, pod, scenarios,
- visualization_detail))
+ with open('./testcases.yaml') as f:
+ testcases_yaml = yaml.safe_load(f)
+
+ for project, case_dicts in testcases_yaml.items():
+ for case in case_dicts:
+ case_name = case.get('name')
+ visualizations = case.get('visualizations')
+ family = case.get('test_family')
+ for installer in _installers:
+ pods_and_scenarios = _get_pods_and_scenarios(project, case_name, installer)
+ for visualization in visualizations:
+ for pod, scenarios in pods_and_scenarios.iteritems():
+ kibana_dashboards.append(KibanaDashboard(project,
+ case_name,
+ family,
+ installer,
+ pod,
+ scenarios,
+ visualization))
return kibana_dashboards
@@ -821,4 +388,3 @@ if __name__ == '__main__':
if generate_inputs:
generate_js_inputs(input_file_path, kibana_url, dashboards)
-
diff --git a/utils/test/scripts/testcases.yaml b/utils/test/scripts/testcases.yaml
new file mode 100644
index 000000000..12031ef5d
--- /dev/null
+++ b/utils/test/scripts/testcases.yaml
@@ -0,0 +1,129 @@
+functest:
+ -
+ name: tempest_smoke_serial
+ test_family: VIM
+ visualizations:
+ -
+ name: duration
+ fields:
+ - field: details.duration
+ -
+ name: tests_failures
+ fields:
+ - field: details.tests
+ - field: details.failures
+ -
+ name: success_percentage
+ fields:
+ - field: details.success_percentage
+ -
+ name: rally_sanity
+ test_family: VIM
+ visualizations:
+ -
+ name: duration
+ fields:
+ - field: details.duration
+ -
+ name: tests_failures
+ fields:
+ - field: details.tests
+ -
+ name: success_percentage
+ fields:
+ - field: details.success_percentage
+ -
+ name: vping_ssh
+ test_family: VIM
+ visualizations:
+ -
+ name: duration
+ fields:
+ - field: details.duration
+ -
+ name: vping_userdata
+ test_family: VIM
+ visualizations:
+ -
+ name: duration
+ fields:
+ - field: details.duration
+ -
+ name: odl
+ test_family: Controller
+ visualizations:
+ -
+ name: tests_failures
+ fields:
+ - field: details.tests
+ - field: details.failures
+ -
+ name: success_percentage
+ fields:
+ - field: details.success_percentage
+ -
+ name: onos
+ test_family: Controller
+ visualizations:
+ -
+ name: duration
+ label: FUNCvirNet
+ fields:
+ - field: details.FUNCvirNet.duration
+ -
+ name: duration
+ label: FUNCvirNetL3
+ fields:
+ - field: details.FUNCvirNetL3.duration
+ -
+ name: tests_failures
+ label: FUNCvirNet
+ fields:
+ - field: details.FUNCvirNet.tests
+ - field: details.FUNCvirNet.failures
+ -
+ name: tests_failures
+ label: FUNCvirNetL3
+ fields:
+ - field: details.FUNCvirNetL3.tests
+ - field: details.FUNCvirNetL3.failures
+ -
+ name: vims
+ test_family: Features
+ visualizations:
+ -
+ name: duration
+ fields:
+ - field: details.vIMS.duration
+ - field: details.orchestrator.duration
+ - field: details.sig_test.duration
+ -
+ name: tests_failures
+ fields:
+ - field: details.sig_test.tests
+ - field: details.sig_test.failures
+ - field: details.sig_test.passed
+ - field: details.sig_test.skipped
+promise:
+ -
+ name: promise
+ test_family: Features
+ visualizations:
+ -
+ name: duration
+ fields:
+ - field: details.duration
+ -
+ name: tests_failures
+ fields:
+ - field: details.tests
+ - field: details.failures
+doctor:
+ -
+ name: doctor-notification
+ test_family: Features
+ visualizations:
+ -
+ name: duration
+ fields:
+ - field: details.duration