summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/bottlenecks/bottlenecks-ci-jobs.yml138
-rw-r--r--jjb/fuel/fuel-ci-jobs.yml2
-rw-r--r--utils/test/result_collection_api/resources/handlers.py5
-rw-r--r--utils/test/result_collection_api/resources/models.py25
-rw-r--r--utils/test/result_collection_api/tests/unit/test_version.py11
5 files changed, 84 insertions, 97 deletions
diff --git a/jjb/bottlenecks/bottlenecks-ci-jobs.yml b/jjb/bottlenecks/bottlenecks-ci-jobs.yml
index c3edce151..686b7d45c 100644
--- a/jjb/bottlenecks/bottlenecks-ci-jobs.yml
+++ b/jjb/bottlenecks/bottlenecks-ci-jobs.yml
@@ -27,52 +27,54 @@
#--------------------------------
# POD, INSTALLER, AND BRANCH MAPPING
#--------------------------------
-# brahmaputra
+# Installers using labels
+# CI PODs
+# This section should only contain the installers
+# that have been switched using labels for slaves
#--------------------------------
pod:
- - lf-pod2:
- installer: fuel
- disabled: true
- <<: *brahmaputra
- - intel-pod5:
- installer: joid
- disabled: true
+#compass CI PODs
+ - baremetal:
+ slave-label: compass-baremetal
+ installer: compass
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+ - virtual:
+ slave-label: compass-virtual
+ installer: compass
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+ - baremetal:
+ slave-label: compass-baremetal
+ installer: compass
+ auto-trigger-name: 'daily-trigger-disabled'
<<: *brahmaputra
- - huawei-pod1:
+ - virtual:
+ slave-label: compass-virtual
installer: compass
- disabled: true
+ auto-trigger-name: 'daily-trigger-disabled'
<<: *brahmaputra
+
#--------------------------------
-# master
+# None-CI PODs
#--------------------------------
- - lf-pod2:
- installer: fuel
- <<: *master
- - ericsson-pod1:
- installer: fuel
- disabled: true
- <<: *master
- - ericsson-pod2:
- installer: fuel
- disabled: true
- <<: *master
- - intel-pod6:
+ - orange-pod2:
+ slave-label: '{pod}'
installer: joid
- disabled: true
- <<: *master
- - intel-pod8:
- installer: compass
- disabled: true
- <<: *master
- - zte-pod1:
- installer: fuel
- disabled: true
- <<: *master
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *brahmaputra
- orange-pod2:
+ slave-label: '{pod}'
installer: joid
- disabled: false
+ auto-trigger-name: 'daily-trigger-disabled'
<<: *master
-#--------------------------------
+ - huawei-pod2:
+ slave-label: '{pod}'
+ installer: compass
+ auto-trigger-name: 'daily-trigger-disabled'
+ <<: *master
+
+#--------------------------------------------
suite:
- 'rubbos'
- 'vstf'
@@ -86,18 +88,22 @@
- job-template:
name: 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}'
- disabled: '{disabled}'
-
wrappers:
- build-name:
name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+ - timeout:
+ timeout: 180
+ abort: true
+
+ triggers:
+ - '{auto-trigger-name}'
parameters:
- project-parameter:
project: '{project}'
- - '{pod}-defaults'
+ - '{slave-label}-defaults'
- '{installer}-defaults'
- - 'bottlenecks-params-{pod}'
+ - 'bottlenecks-params-{slave-label}'
- string:
name: REPO_DIR
default: "/home/opnfv/bottlenecks"
@@ -203,67 +209,27 @@
####################
- parameter:
- name: 'bottlenecks-params-intel-pod5'
- parameters:
- - string:
- name: BOTTLENECKS_DB_TARGET
- default: '213.77.62.197'
- description: 'Arguments to use in order to choose the backend DB'
-
-- parameter:
- name: 'bottlenecks-params-intel-pod6'
- parameters:
- - string:
- name: BOTTLENECKS_DB_TARGET
- default: '213.77.62.197'
- description: 'Arguments to use in order to choose the backend DB'
-
-- parameter:
- name: 'bottlenecks-params-intel-pod8'
- parameters:
- - string:
- name: BOTTLENECKS_DB_TARGET
- default: '213.77.62.197'
- description: 'Arguments to use in order to choose the backend DB'
-
-- parameter:
- name: 'bottlenecks-params-ericsson-pod1'
- parameters:
- - string:
- name: BOTTLENECKS_DB_TARGET
- default: '213.77.62.197'
- description: 'Arguments to use in order to choose the backend DB'
-
-- parameter:
- name: 'bottlenecks-params-ericsson-pod2'
- parameters:
- - string:
- name: BOTTLENECKS_DB_TARGET
- default: '213.77.62.197'
- description: 'Arguments to use in order to choose the backend DB'
-
-- parameter:
- name: 'bottlenecks-params-lf-pod2'
+ name: 'bottlenecks-params-compass-baremetal'
parameters:
- string:
name: BOTTLENECKS_DB_TARGET
- default: '213.77.62.197'
+ default: '104.197.68.199:8086'
description: 'Arguments to use in order to choose the backend DB'
- parameter:
- name: 'bottlenecks-params-huawei-pod1'
+ name: 'bottlenecks-params-compass-virtual'
parameters:
- string:
name: BOTTLENECKS_DB_TARGET
- default: '213.77.62.197'
+ default: ''
description: 'Arguments to use in order to choose the backend DB'
- parameter:
- name: 'bottlenecks-params-zte-pod1'
+ name: 'bottlenecks-params-huawei-pod2'
parameters:
- string:
name: BOTTLENECKS_DB_TARGET
- default: '213.77.62.197'
+ default: '104.197.68.199:8086'
description: 'Arguments to use in order to choose the backend DB'
- parameter:
@@ -271,5 +237,5 @@
parameters:
- string:
name: BOTTLENECKS_DB_TARGET
- default: '213.77.62.197'
+ default: '104.197.68.199:8086'
description: 'Arguments to use in order to choose the backend DB'
diff --git a/jjb/fuel/fuel-ci-jobs.yml b/jjb/fuel/fuel-ci-jobs.yml
index 5d2b91db8..a7ac96e8c 100644
--- a/jjb/fuel/fuel-ci-jobs.yml
+++ b/jjb/fuel/fuel-ci-jobs.yml
@@ -153,7 +153,7 @@
properties:
- throttle:
enabled: true
- max-total: 1
+ max-total: 4
max-per-node: 1
- build-blocker:
use-build-blocker: true
diff --git a/utils/test/result_collection_api/resources/handlers.py b/utils/test/result_collection_api/resources/handlers.py
index a2c6b8d01..0977ef07e 100644
--- a/utils/test/result_collection_api/resources/handlers.py
+++ b/utils/test/result_collection_api/resources/handlers.py
@@ -223,7 +223,8 @@ class VersionHandler(GenericApiHandler):
@swagger.operation(nickname='list')
def get(self):
"""
- @description: Display a message for the API version
+ @description: list all supported versions
@rtype: L{Versions}
"""
- self.finish_request([{'v1': 'basics'}])
+ versions = [{'version': 'v1.0', 'description': 'basics'}]
+ self.finish_request({'versions': versions})
diff --git a/utils/test/result_collection_api/resources/models.py b/utils/test/result_collection_api/resources/models.py
index 3c834fd48..7241bb7a8 100644
--- a/utils/test/result_collection_api/resources/models.py
+++ b/utils/test/result_collection_api/resources/models.py
@@ -36,10 +36,21 @@ class CreateResponse(object):
@swagger.model()
class Versions(object):
"""
+ @property versions:
@ptype versions: C{list} of L{Version}
"""
- def __init__(self, versions):
- self.versions = versions
+ def __init__(self):
+ self.versions = list()
+
+ @staticmethod
+ def from_dict(res_dict):
+ if res_dict is None:
+ return None
+
+ res = Versions()
+ for version in res_dict.get('versions'):
+ res.versions.append(Version.from_dict(version))
+ return res
@swagger.model()
@@ -47,3 +58,13 @@ class Version(object):
def __init__(self, version=None, description=None):
self.version = version
self.description = description
+
+ @staticmethod
+ def from_dict(a_dict):
+ if a_dict is None:
+ return None
+
+ ver = Version()
+ ver.version = a_dict.get('version')
+ ver.description = str(a_dict.get('description'))
+ return ver
diff --git a/utils/test/result_collection_api/tests/unit/test_version.py b/utils/test/result_collection_api/tests/unit/test_version.py
index a58cd5629..8e544e060 100644
--- a/utils/test/result_collection_api/tests/unit/test_version.py
+++ b/utils/test/result_collection_api/tests/unit/test_version.py
@@ -1,15 +1,14 @@
-import json
import unittest
from test_base import TestBase
-
+from resources.models import Versions
__author__ = 'serena'
class TestVersionbBase(TestBase):
def setUp(self):
super(TestVersionbBase, self).setUp()
- self.list_res = None
+ self.list_res = Versions
self.basePath = '/versions'
@@ -17,9 +16,9 @@ class TestVersion(TestVersionbBase):
def test_success(self):
code, body = self.get()
self.assertEqual(200, code)
- json_body = json.loads(body)
- self.assertEqual(len(json_body), 1)
- self.assertEqual('basics', json_body[0].get('v1'))
+ self.assertEqual(len(body.versions), 1)
+ self.assertEqual(body.versions[0].version, 'v1.0')
+ self.assertEqual(body.versions[0].description, 'basics')
if __name__ == '__main__':
unittest.main()