...
 
Commits (159)
......@@ -3,7 +3,6 @@ stages:
- analyze
- build
- docker
- publish
- deploy
include:
......@@ -33,8 +32,7 @@ include:
.dind: &dind
<<: *job
tags:
- amd64
- dind
- amd64-dind
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
......@@ -110,8 +108,7 @@ pylint:
sast:
stage: analyze
tags:
- amd64
- dind
- amd64-dind
variables:
DOCKER_DRIVER: overlay2
SAST_DEFAULT_ANALYZERS: "bandit"
......@@ -208,7 +205,7 @@ aarch64/pkg-debian-9:
refs:
- master
- tags
tags: [dind, aarch64]
tags: [aarch64-dind]
dependencies: [aarch64/pkg-debian-10, amd64/pkg-debian-10]
amd64/lava-dispatcher: *docker
......@@ -216,19 +213,6 @@ amd64/lava-server: *docker
aarch64/lava-dispatcher: *docker_aarch64
aarch64/lava-server: *docker_aarch64
###########
# Publish #
###########
manifest:
<<: *dind
stage: publish
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE
only:
refs:
- master
- tags
##########
# Deploy #
##########
......
......@@ -7,5 +7,5 @@ then
echo "nothing to do"
else
set -x
LC_ALL=C.UTF-8 LANG=C.UTF-8 black --exclude "dashboard_app" --check .
LC_ALL=C.UTF-8 LANG=C.UTF-8 black --exclude "dashboard_app" --check . lava/dispatcher/lava-run
fi
......@@ -8,12 +8,10 @@ then
apt-get install --no-install-recommends --yes python3 python3-nose python3-voluptuous python3-yaml
else
# documentation
EXCLUDE="bbb-2serial.yaml bbb-lxc-ssh-guest.yaml hikey-new-connection.yaml multiple-serial-ports-lxc.yaml mustang-ssh-guest.yaml"
CMD="--exclude $(echo ${EXCLUDE} | sed "s# # --exclude #g#")"
PYTHONPATH=. ./share/lava-schema.py job ${CMD} doc/v2/examples/test-jobs/*.yaml
PYTHONPATH=. ./share/lava-schema.py job doc/v2/examples/test-jobs/*.yaml
# lava_dispatcher
EXCLUDE="basics.yaml bbb-group-vland-alpha.yaml bbb-group-vland-beta.yaml bbb-ssh-guest.yaml hikey-console.yaml kvm-multinode-client.yaml kvm-multinode-server.yaml kvm-repeat.yaml test_action-1.yaml test_action-2.yaml"
EXCLUDE="basics.yaml bbb-group-vland-alpha.yaml bbb-group-vland-beta.yaml bbb-ssh-guest.yaml kvm-multinode-client.yaml kvm-multinode-server.yaml kvm-repeat.yaml test_action-1.yaml test_action-2.yaml"
CMD="--exclude $(echo ${EXCLUDE} | sed "s# # --exclude #g#")"
PYTHONPATH=. ./share/lava-schema.py job ${CMD} lava_dispatcher/tests/sample_jobs/*.yaml
......@@ -21,7 +19,7 @@ else
PYTHONPATH=. ./share/lava-schema.py job lava_results_app/tests/*.yaml
# lava_scheduler_app
EXCLUDE="kvm-multinode-client.yaml kvm-multinode-server.yaml mustang-ssh-multinode.yaml qemu-ssh-guest-1.yaml qemu-ssh-guest-2.yaml qemu-ssh-parent.yaml"
EXCLUDE="kvm-multinode-client.yaml kvm-multinode-server.yaml qemu-ssh-guest-1.yaml qemu-ssh-guest-2.yaml qemu-ssh-parent.yaml"
CMD="--exclude $(echo ${EXCLUDE} | sed "s# # --exclude #g#")"
PYTHONPATH=. ./share/lava-schema.py job ${CMD} lava_scheduler_app/tests/sample_jobs/*.yaml
fi
#!/usr/bin/env python3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# parse.py
# Copyright (C) 2019 Linaro Limited
#
# Copyright 2019 Neil Williams <neil.williams@linaro.org>
# Author: Neil Williams <neil.williams@linaro.org>
# Remi Duraffort <remi.duraffort@linaro.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# This file is part of LAVA.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# LAVA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# LAVA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses>.
import json
import re
import os
import sys
import string
import subprocess # nosec - internal
FILENAME = "gl-code-quality-report.json"
def main(args):
data = []
......@@ -38,8 +43,23 @@ def main(args):
p.wait() # wait for the subprocess to exit
data_str = data[0]
data_str = re.sub(f"[^{re.escape(string.printable)}]", "", data_str)
with open("gl-code-quality-report.json", "w") as radon:
with open(FILENAME, "w") as radon:
radon.write("[\n%s\n]" % data_str.replace("}{", "},\n{"))
ret = []
with open(FILENAME, "r") as f_in:
data = json.load(f_in)
for line in data:
ret.append(
"%s [%s, %s]: %s"
% (
line["location"]["path"],
line["location"]["lines"]["begin"],
line["location"]["lines"]["end"],
line["description"],
)
)
print("\n".join(sorted(ret)))
return 0
......
......@@ -23,4 +23,7 @@ else
./share/debian-dev-build.sh -B -o _build -s buster
debc $(find _build -name 'lava_*_arm64.changes' 2>/dev/null|head -n1)
git branch -D cibase || true
# Check dependencies
.gitlab-ci/build/check-debian-deps.py --suite buster --package lava-dispatcher _build/lava-dispatcher_*
fi
......@@ -23,4 +23,7 @@ else
./share/debian-dev-build.sh -o _build -s stretch -B
debc $(find _build -name 'lava_*_arm64.changes' 2>/dev/null|head -n1)
git branch -D cibase || true
# Check dependencies
.gitlab-ci/build/check-debian-deps.py --suite stretch-backports --package lava-dispatcher _build/lava-dispatcher_*
fi
......@@ -23,4 +23,9 @@ else
./share/debian-dev-build.sh -o _build -s buster
debc $(find _build -name 'lava_*_amd64.changes' 2>/dev/null|head -n1)
git branch -D cibase || true
# Check dependencies
.gitlab-ci/build/check-debian-deps.py --suite buster --package lava-common _build/lava-common_*
.gitlab-ci/build/check-debian-deps.py --suite buster --package lava-dispatcher _build/lava-dispatcher_*
.gitlab-ci/build/check-debian-deps.py --suite buster --package lava-server _build/lava-server_*
fi
......@@ -23,4 +23,9 @@ else
./share/debian-dev-build.sh -o _build -s stretch
debc $(find _build -name 'lava_*_amd64.changes' 2>/dev/null|head -n1)
git branch -D cibase || true
# Check dependencies
.gitlab-ci/build/check-debian-deps.py --suite stretch-backports --package lava-common _build/lava-common_*
.gitlab-ci/build/check-debian-deps.py --suite stretch-backports --package lava-dispatcher _build/lava-dispatcher_*
.gitlab-ci/build/check-debian-deps.py --suite stretch-backports --package lava-server _build/lava-server_*
fi
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Linaro Limited
#
# Author: Rémi Duraffort <remi.duraffort@linaro.org>
#
# This file is part of LAVA.
#
# LAVA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LAVA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along
# with this program; if not, see <http://www.gnu.org/licenses>.
import argparse
import pathlib
import re
import subprocess
import sys
import yaml
def load_requirements(suite, package):
debian = pathlib.Path("share/requirements/debian")
requirements = {}
if suite.endswith("-backports"):
base_suite = suite.replace("-backports", "")
data = yaml.safe_load(
(debian / ("%s.yaml" % base_suite)).read_text(encoding="utf-8")
)[package]
if data is not None:
requirements = data
data = yaml.safe_load((debian / ("%s.yaml" % suite)).read_text(encoding="utf-8"))[
package
]
if data is not None:
requirements.update(data)
return requirements
def prune_requirements(requirements):
return {
v["name"]: v.get("version", "")
for k, v in requirements.items()
if not v.get("unittests", False)
}
def list_dependencies(filename):
out = subprocess.check_output(
["dpkg", "-I", filename], stderr=subprocess.STDOUT
).decode("utf-8")
deps = None
for line in out.split("\n"):
if line.startswith(" Depends: "):
deps = line.replace(" Depends: ", "")
break
pattern = re.compile(r"(.+) \(>= (.+)\)$")
dependencies = {}
for dep in deps.split(", "):
m = pattern.match(dep)
if m is not None:
dependencies[m.group(1)] = ">=" + m.group(2)
else:
dependencies[dep] = ""
return dependencies
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--suite", required=True, help="debian distributions")
parser.add_argument(
"--package",
required=True,
choices=["lava-common", "lava-dispatcher", "lava-server"],
help="debian package",
)
parser.add_argument("filename", type=str, help="debian package")
options = parser.parse_args()
# Load and prune requirements
reqs = load_requirements(options.suite, options.package)
reqs = prune_requirements(reqs)
# List debian package dependencies
deps = list_dependencies(options.filename)
failures = 0
for req in sorted(reqs):
ok = bool(reqs[req] == deps[req])
failures += not ok
ok_str = "OK" if ok else "NOK"
string_str = " (%s)" % reqs[req] if reqs[req] else ""
print("* %s%s [%s]" % (req, string_str, ok_str))
return failures
if __name__ == "__main__":
sys.exit(main())
#!/bin/sh
set -e
if [ "$1" = "setup" ]
then
set -x
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
apk add git python3
else
set -x
# Build the image tag
if [ -n "$CI_COMMIT_TAG" ]
then
IMAGE_TAG="$CI_COMMIT_TAG"
else
IMAGE_TAG="$(./version.py)"
fi
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create $CI_REGISTRY_IMAGE/lava-dispatcher:$IMAGE_TAG $CI_REGISTRY_IMAGE/amd64/lava-dispatcher:$IMAGE_TAG $CI_REGISTRY_IMAGE/aarch64/lava-dispatcher:$IMAGE_TAG
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push $CI_REGISTRY_IMAGE/lava-dispatcher:$IMAGE_TAG
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create $CI_REGISTRY_IMAGE/lava-server:$IMAGE_TAG $CI_REGISTRY_IMAGE/amd64/lava-server:$IMAGE_TAG $CI_REGISTRY_IMAGE/aarch64/lava-server:$IMAGE_TAG
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push $CI_REGISTRY_IMAGE/lava-server:$IMAGE_TAG
fi
See https://master.lavasoftware.org/static/docs/v2/code-of-conduct.html
See https://docs.lavasoftware.org/lava/code-of-conduct.html
See https://master.lavasoftware.org/static/docs/v2/contribution.html
See https://docs.lavasoftware.org/lava/contribution.html
......@@ -34,7 +34,7 @@ include lava_dispatcher/lava_test_shell/distro/ubuntu/*
include lava_server/templates/robots.txt
include man/*
include requirements.txt
include README
include README.md
include share/*
include share/apache2/*
include share/zmq/*
......@@ -45,7 +45,6 @@ recursive-include doc/v2/examples *.yaml *.txt *.py *.jinja2
recursive-include doc/v2/_templates *.html
recursive-include etc/dispatcher-config README
recursive-include share/requirements *.yaml
recursive-include lava_dispatcher/devices *.yaml
recursive-include lava_dispatcher/tests *.yaml *.txt
recursive-include lava_rest_app/templates *.html
recursive-include lava_results_app/templates *.html
......
Installation instructions
=======================
For latest information, see the lava-server documentation:
https://master.lavasoftware.org/static/docs/v2/first-installation.html
https://master.lavasoftware.org/static/docs/v2/installing_on_debian.html
Support
=======
https://master.lavasoftware.org/static/docs/v2/support.html
Reporting Bugs
==============
Bugs should first be discussed by subscribing to the
lava-users mailing list.
https://lists.linaro.org/mailman/listinfo/lava-users
Bug reports and new LAVA features are tracked using GitLab:
https://git.lavasoftware.org/lava/lava/issues
LAVA
====
LAVA is an automated validation architecture primarily aimed at testing
deployments of systems based around the Linux kernel on ARM devices,
specifically ARMv7 and later.
This repository contains the dispatcher and server source code.
Installation instructions
=========================
For latest information, see the lava-server documentation:
* [first installation](https://docs.lavasoftware.org/lava/first-installation.html)
* [installing on Debian](https://docs.lavasoftware.org/lava/installing_on_debian.html)
Support
=======
Read the [support](https://docs.lavasoftware.org/lava/support.html) page.
Reporting Bugs
==============
Bugs should first be discussed by subscribing to the
[lava-users](https://lists.lavasoftware.org/mailman/listinfo/lava-users)
mailing list.
Bug reports and new LAVA features are tracked using
[GitLab](https://git.lavasoftware.org/lava/lava/issues).
This diff is collapsed.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='bundle',
name='is_deserialized',
field=models.BooleanField(default=False, help_text='Set when document has been analyzed and loaded into the database', verbose_name='Is deserialized', editable=False),
),
migrations.AlterField(
model_name='bundlestream',
name='is_anonymous',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='testrun',
name='time_check_performed',
field=models.BooleanField(default=False, help_text="Indicator on wether timestamps in the log file (and any data derived from them) should be trusted.<br/>Many pre-production or development devices do not have a battery-powered RTC and it's not common for development images not to synchronize time with internet time servers.<br/>This field allows us to track tests results that <em>certainly</em> have correct time if we ever end up with lots of tests results from 1972", verbose_name='Time check performed'),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('dashboard_app', '0002_auto_20140917_1935'),
]
operations = [
migrations.CreateModel(
name='ImageChartTestAttributeUser',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('is_visible', models.BooleanField(default=True, verbose_name='Visible')),
('image_chart_test_attribute', models.ForeignKey(to='dashboard_app.ImageChartTestAttribute')),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
options={
},
bases=(models.Model,),
),
migrations.AlterUniqueTogether(
name='imagecharttestattributeuser',
unique_together=set([('image_chart_test_attribute', 'user')]),
),
migrations.AlterField(
model_name='imagereportchart',
name='chart_type',
field=models.CharField(default='pass/fail', max_length=20, verbose_name='Chart type', choices=[('pass/fail', 'Pass/Fail'), ('measurement', 'Measurement'), ('attributes', 'Attributes')]),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0003_auto_20140926_1208'),
]
operations = [
migrations.AddField(
model_name='imagereportchart',
name='is_delta',
field=models.BooleanField(default=False, verbose_name='Delta reporting'),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0004_imagereportchart_is_delta'),
]
operations = [
migrations.AddField(
model_name='imagereportchart',
name='chart_height',
field=models.PositiveIntegerField(default=200, verbose_name='Chart height', validators=[django.core.validators.MinValueValidator(200), django.core.validators.MaxValueValidator(400)]),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0005_imagereportchart_chart_height'),
]
operations = [
migrations.RemoveField(
model_name='imagechartuser',
name='toggle_percentage',
),
migrations.AddField(
model_name='imagereportchart',
name='is_percentage',
field=models.BooleanField(default=False, verbose_name='Percentage'),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0006_auto_20141028_1146'),
]
operations = [
migrations.AddField(
model_name='imagereportchart',
name='chart_visibility',
field=models.CharField(default='chart', max_length=20, verbose_name='Chart visibility', choices=[('chart', 'Chart only'), ('table', 'Result table only'), ('both', 'Both')]),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0007_imagereportchart_chart_visibility'),
]
operations = [
migrations.AddField(
model_name='imagechartfilter',
name='is_all_tests_included',
field=models.BooleanField(default=False, verbose_name='Include all tests from this filter'),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0008_imagechartfilter_is_all_tests_included'),
]
operations = [
migrations.AlterField(
model_name='testresult',
name='measurement',
field=models.CharField(blank=True, max_length=512, help_text="Arbitrary value that was measured as a part of this test.", null=True, verbose_name="Measurement"),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0009_auto_20150108_0711'),
]
operations = [
migrations.AddField(
model_name='imagereportchart',
name='is_build_number',
field=models.BooleanField(default=False, verbose_name='Use build number'),
preserve_default=True,
),
migrations.AddField(
model_name='imagereportchart',
name='xaxis_attribute',
field=models.CharField(max_length=20, null=True, verbose_name='X-axis attribute', blank=True),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0010_auto_20150116_1533'),
]
operations = [
migrations.AddField(
model_name='imagereportchart',
name='is_aggregate_results',
field=models.BooleanField(default=False, verbose_name='Aggregate parametrized results'),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0011_imagereportchart_is_aggregate_results'),
]
operations = [
migrations.AlterModelOptions(
name='imagereportchart',
options={'ordering': ['relative_index']},
),
migrations.AddField(
model_name='imagereportchart',
name='relative_index',
field=models.PositiveIntegerField(default=0, verbose_name='Order in the report'),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0012_auto_20150126_1644'),
]
operations = [
migrations.RemoveField(
model_name='imagereportchart',
name='is_delta',
),
migrations.AddField(
model_name='imagechartuser',
name='is_delta',
field=models.BooleanField(default=False, verbose_name='Delta reporting'),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0013_auto_20150127_1341'),
]
operations = [
migrations.AlterField(
model_name='imagereportchart',
name='chart_height',
field=models.PositiveIntegerField(default=300, verbose_name='Chart height', validators=[django.core.validators.MinValueValidator(200), django.core.validators.MaxValueValidator(400)]),
preserve_default=True,
),
migrations.AlterField(
model_name='imagereportchart',
name='is_aggregate_results',
field=models.BooleanField(default=True, verbose_name='Aggregate parametrized results'),
preserve_default=True,
),
migrations.AlterField(
model_name='imagereportchart',
name='is_build_number',
field=models.BooleanField(default=True, verbose_name='Use build number'),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
def remove_stale_content_types(apps, schema_editor):
# Remove known stale objects from django_content_type table.
ContentType = apps.get_model("contenttypes", "ContentType")
models = {
("auth", "message"),
("dashboard_app", "launchpadbug"),
("dashboard_app", "imagecharttestrun"),
("dashboard_app", "testingeffort"),
("dashboard_app", "imageattribute")
}
for model in models:
try:
ContentType.objects.get(app_label=model[0],
model=model[1]).delete()
except ContentType.DoesNotExist:
pass
def reverse_func(apps, schema_editor):
# Content types are automatically added by django.
pass
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0014_auto_20150212_0604'),
]
operations = [
migrations.RunPython(
remove_stale_content_types,
reverse_func
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0015_remove_stale_content_types'),
]
operations = [
migrations.AlterField(
model_name='testrunfiltertest',
name='test',
field=models.ForeignKey(related_name='testrunfilters', to='dashboard_app.Test'),
preserve_default=True,
),
migrations.AlterField(
model_name='testrunfiltertestcase',
name='test_case',
field=models.ForeignKey(related_name='testrunfilters', to='dashboard_app.TestCase'),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0016_auto_20150325_1235'),
]
operations = [
migrations.AddField(
model_name='namedattribute',
name='is_manual',
field=models.NullBooleanField(),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
('dashboard_app', '0017_namedattribute_is_manual'),
]
operations = [
migrations.AddField(
model_name='imagereport',
name='group',
field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, default=None, to='auth.Group', null=True),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0018_imagereport_group'),
]
operations = [
migrations.RunSQL(
sql="SET LOCAL statement_timeout to 10000000;",
reverse_sql="SET LOCAL statement_timeout to 30000;"
),
migrations.AlterUniqueTogether(
name='namedattribute',
unique_together=set([('object_id', 'name', 'content_type')]),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0019_auto_20150702_1529'),
]
operations = [
migrations.AddField(
model_name='imagereport',
name='is_archived',
field=models.BooleanField(default=False, verbose_name='Archived'),
preserve_default=True,
),
migrations.AlterField(
model_name='imagereport',
name='group',
field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, default=None, blank=True, to='auth.Group', null=True),
preserve_default=True,
),
migrations.AlterField(
model_name='imagereport',
name='image_report_group',
field=models.ForeignKey(default=None, blank=True, to='dashboard_app.ImageReportGroup', null=True),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-14 13:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0021_auto_20151207_0921'),
]
operations = [
migrations.AlterField(
model_name='imagechartfilter',
name='filter',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='dashboard_app.TestRunFilter'),
),
]
This diff is collapsed.
# Copyright (C) 2010, 2011 Linaro Limited
#
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
#
# This file is part of Lava Dashboard.
#
# Lava Dashboard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3
# as published by the Free Software Foundation
#
# Lava Dashboard is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Lava Dashboard. If not, see <http://www.gnu.org/licenses/>.
"""
Database models of the Dashboard application
"""
from __future__ import unicode_literals
import gzip
from django.core.files import File
from django.core.files.storage import FileSystemStorage
class GzipFileSystemStorage(FileSystemStorage):
def _open(self, name, mode='rb'):
full_path = self.path(name)
gzip_file = gzip.GzipFile(full_path, mode)
gzip_file.name = full_path
return File(gzip_file)
# Copyright (C) 2010 Linaro Limited
#
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
#
# This file is part of Lava Dashboard.
#
# Lava Dashboard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3
# as published by the Free Software Foundation
#
# Lava Dashboard is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Lava Dashboard. If not, see <http://www.gnu.org/licenses/>.
"""
URL mappings for the Dashboard application
https://docs.djangoproject.com/en/1.8/topics/http/urls/#naming-url-patterns
https://docs.djangoproject.com/en/1.8/releases/1.8/#passing-a-dotted-path-to-reverse-and-url
Avoid letting the name attribute of a url look like a python path - use underscore
instead of period. The name is just a label, using it as a path is deprecated and
support will be removed in Django1.10. Equally, always provide a name if the URL
needs to be reversed elsewhere in the code, e.g. the view. (Best practice is to
use a name for all new urls, even if not yet used elsewhere.)
"""
from django.conf.urls import url
urlpatterns = [
]
# Copyright (C) 2010 Linaro Limited
#
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
#
# This file is part of LAVA Dashboard
#
# Lava Dashboard is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3
# as published by the Free Software Foundation
#
# Lava Dashboard is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Lava Dashboard. If not, see <http://www.gnu.org/licenses/>.
"""
XMP-RPC API
"""
import logging
from linaro_django_xmlrpc.models import (
ExposedAPI,
Mapper,
xml_rpc_signature,
)
class errors:
"""
A namespace for error codes that may be returned by various XML-RPC
methods. Where applicable existing status codes from HTTP protocol
are reused
"""
AUTH_FAILED = 100
AUTH_BLOCKED = 101
BAD_REQUEST = 400
AUTH_REQUIRED = 401
FORBIDDEN = 403
NOT_FOUND = 404
CONFLICT = 409
INTERNAL_SERVER_ERROR = 500
NOT_IMPLEMENTED = 501
class DashboardAPI(ExposedAPI):
"""
Dashboard API object.
All public methods are automatically exposed as XML-RPC methods
"""
def __init__(self, context=None):
super(DashboardAPI, self).__init__(context)
self.logger = logging.getLogger(__name__ + 'DashboardAPI')
@xml_rpc_signature('str')
def version(self):
"""
Name
----
`version` ()
Deprecated
----------
This function has been disabled in api_version 2. It is
retained as a stub for older versions of clients. Please
update your tool to use LAVA V2.
See system.api_version()
"""
return 'unknown'
@xml_rpc_signature('str', 'str', 'str', 'str')
def put(self, content, content_filename, pathname):
"""
Name
----
`put` (`content`, `content_filename`, `pathname`)
Removal of V1 support
--------------------
This function has been disabled in api_version 2. It is
retained as a stub for older versions of clients. Please
update your tool to use LAVA V2.
See system.api_version()
"""
return ""
@xml_rpc_signature('str', 'str', 'str', 'str')
def put_ex(self, content, content_filename, pathname):
"""
Name
----
`put` (`content`, `content_filename`, `pathname`)
Removal of V1 support
--------------------
This function has been disabled in api_version 2. It is
retained as a stub for older versions of clients. Please
update your tool to use LAVA V2.
See system.api_version()
"""
return ""
def put_pending(self, content, pathname, group_name):
"""
Name
----
`put_pending` (`content`, `pathname`, `group_name`)
Removal of V1 support
--------------------
This function has been disabled in api_version 2. It is
retained as a stub for older versions of clients. Please
update your tool to use LAVA V2.
See system.api_version()
"""
return ""
def put_group(self, content, content_filename, pathname, group_name):
"""
Name
----
`put_group` (`content`, `content_filename`, `pathname`, `group_name`)
Removal of V1 support
--------------------
This function has been disabled in api_version 2. It is
retained as a stub for older versions of clients. Please
update your tool to use LAVA V2.
See system.api_version()
"""
return ""
def get(self, content_sha1):
"""
Name
----
`get` (`content_sha1`)
Removal of V1 support
--------------------
This function has been disabled in api_version 2. It is
retained as a stub for older versions of clients. Please
update your tool to use LAVA V2.
See system.api_version()
"""
return {"content": "",
"content_filename": ""}
@xml_rpc_signature('struct')
def streams(self):
"""
Name
----
`streams` ()
Removal of V1 support
--------------------
This function has been disabled in api_version 2. It is
retained as a stub for older versions of clients. Please
update your tool to use LAVA V2.
See system.api_version()
"""
return []