summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/fetch_os_creds.sh2
-rw-r--r--utils/test/reporting/docker/Dockerfile17
-rwxr-xr-xutils/test/reporting/docker/web_server.sh2
-rw-r--r--utils/test/reporting/setup.py1
-rw-r--r--utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py4
-rw-r--r--utils/test/testapi/opnfv_testapi/resources/scenario_models.py6
-rw-r--r--utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py3
7 files changed, 24 insertions, 11 deletions
diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh
index 8374edbbd..312e1ac5c 100755
--- a/utils/fetch_os_creds.sh
+++ b/utils/fetch_os_creds.sh
@@ -107,7 +107,7 @@ if [ "$installer_type" == "fuel" ]; then
# retrieving controller vip
controller_ip=$(ssh 2>/dev/null ${ssh_options} ubuntu@${installer_ip} \
- "sudo salt --out txt 'ctl01*' pillar.get _param:openstack_control_address | awk '{print \$2}'" | \
+ "sudo salt --out txt 'ctl*' pillar.get _param:openstack_control_address | awk '{print \$2; exit}'" | \
sed 's/ //g') &> /dev/null
info "Fetching rc file from controller $controller_ip..."
diff --git a/utils/test/reporting/docker/Dockerfile b/utils/test/reporting/docker/Dockerfile
index f5168d1ae..f2357909d 100644
--- a/utils/test/reporting/docker/Dockerfile
+++ b/utils/test/reporting/docker/Dockerfile
@@ -27,19 +27,28 @@ ENV CONFIG_REPORTING_YAML ${working_dir}/reporting.yaml
WORKDIR ${HOME}
# Packaged dependencies
RUN apt-get update && apt-get install -y \
+build-essential \
ssh \
+curl \
+gnupg \
python-pip \
+python-dev \
+python-setuptools \
git-core \
-nodejs \
-npm \
supervisor \
--no-install-recommends
-RUN pip install --upgrade pip
+RUN pip install --upgrade pip && easy_install -U setuptools==30.0.0
-RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${HOME}/releng
+RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng /home/opnfv/releng
RUN pip install -r ${working_dir}/requirements.txt
+RUN sh -c 'curl -sL https://deb.nodesource.com/setup_8.x | bash -' \
+ && apt-get install -y nodejs \
+ && npm install -g bower \
+ && npm install -g grunt \
+ && npm install -g grunt-cli
+
WORKDIR ${working_dir}
RUN python setup.py install
RUN docker/reporting.sh
diff --git a/utils/test/reporting/docker/web_server.sh b/utils/test/reporting/docker/web_server.sh
index a34c11dd7..0dd8df73d 100755
--- a/utils/test/reporting/docker/web_server.sh
+++ b/utils/test/reporting/docker/web_server.sh
@@ -9,8 +9,6 @@ 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/setup.py b/utils/test/reporting/setup.py
index a52d90555..17849f67b 100644
--- a/utils/test/reporting/setup.py
+++ b/utils/test/reporting/setup.py
@@ -8,7 +8,6 @@
# http://www.apache.org/licenses/LICENSE-2.0
# pylint: disable=missing-docstring
-
import setuptools
# In python < 2.7.4, a lazy loading of package `pbr` will break
diff --git a/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py b/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py
index bd06400b4..d215d18b9 100644
--- a/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py
+++ b/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py
@@ -255,7 +255,7 @@ class ScenarioUpdater(object):
@iter_installers
@iter_versions
def _update_requests_change_owner(self, version):
- version.owner = self.body
+ version.owner = self.body.get('owner')
def _filter_installers(self, installers):
return self._filter('installer', installers)
@@ -584,7 +584,7 @@ class ScenarioOwnerHandler(GenericScenarioUpdateHandler):
installer=<installer_name>& \
version=<version_name>
@param body: new owner
- @type body: L{string}
+ @type body: L{ScenarioChangeOwnerRequest}
@in body: body
@param installer: installer type
@type installer: L{string}
diff --git a/utils/test/testapi/opnfv_testapi/resources/scenario_models.py b/utils/test/testapi/opnfv_testapi/resources/scenario_models.py
index ec262aa2f..c6da76b81 100644
--- a/utils/test/testapi/opnfv_testapi/resources/scenario_models.py
+++ b/utils/test/testapi/opnfv_testapi/resources/scenario_models.py
@@ -161,6 +161,12 @@ class ScenarioCreateRequest(models.ModelBase):
@swagger.model()
+class ScenarioChangeOwnerRequest(models.ModelBase):
+ def __init__(self, owner=None):
+ self.owner = owner
+
+
+@swagger.model()
class Scenario(models.ModelBase):
"""
@property installers:
diff --git a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
index f9bb58c6b..50a8c8d2d 100644
--- a/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
+++ b/utils/test/testapi/opnfv_testapi/tests/unit/resources/test_scenario.py
@@ -297,8 +297,9 @@ class TestScenarioUpdate(TestScenarioBase):
@update_partial('_update', '_success')
def test_changeOwner(self, scenario):
new_owner = 'new_owner'
+ update = models.ScenarioChangeOwnerRequest(new_owner).format()
scenario['installers'][0]['versions'][0]['owner'] = new_owner
- return new_owner, scenario
+ return update, scenario
def _add(self, update_req, new_scenario):
return self.post_direct_url(self.update_url, update_req)