Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id A5101E00798; Mon, 13 Jun 2016 16:31:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.93 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B61E1E00566 for ; Mon, 13 Jun 2016 16:31:26 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 13 Jun 2016 16:31:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,468,1459839600"; d="scan'208";a="1001247084" Received: from alimonb-mobl1.zpn.intel.com ([10.219.5.51]) by fmsmga002.fm.intel.com with ESMTP; 13 Jun 2016 16:31:25 -0700 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= To: yocto@yoctoproject.org Date: Mon, 13 Jun 2016 18:32:13 -0500 Message-Id: <1465860736-26581-6-git-send-email-anibal.limon@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1465860736-26581-1-git-send-email-anibal.limon@linux.intel.com> References: <1465860736-26581-1-git-send-email-anibal.limon@linux.intel.com> MIME-Version: 1.0 Cc: belen.barros.pena@linux.intel.com Subject: [[PATCH][error-report-web] 5/8] Post/models.py: Build model add support for Error type. X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 23:31:28 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to support other errors not only Recipe ones adds a ERROR_TYPE field to the Build model defaults to "Recipe". Add a class for store BuildErrorType currently supported Recipe, Core, Bitbake selftest and OE selftest. [YOCTO #7583] Signed-off-by: Aníbal Limón --- Post/migrations/0005_build_error_type.py | 19 +++++++++++++++++++ Post/models.py | 7 +++++++ 2 files changed, 26 insertions(+) create mode 100644 Post/migrations/0005_build_error_type.py diff --git a/Post/migrations/0005_build_error_type.py b/Post/migrations/0005_build_error_type.py new file mode 100644 index 0000000..96cdf8c --- /dev/null +++ b/Post/migrations/0005_build_error_type.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('Post', '0004_auto_20160530_1126'), + ] + + operations = [ + migrations.AddField( + model_name='build', + name='ERROR_TYPE', + field=models.CharField(default=b'Recipe', max_length=64), + ), + ] diff --git a/Post/models.py b/Post/models.py index 84f8abf..f8d9916 100644 --- a/Post/models.py +++ b/Post/models.py @@ -11,6 +11,12 @@ from datetime import datetime import Levenshtein +class BuildErrorType(object): + RECIPE = "Recipe" + BITBAKE_CORE = "Core" + BITBAKE_SELFTEST = "Bitbake selftest" + OE_SELFTEST = "OE selftest" + # Create your models here. class Build(models.Model): DATE = models.DateTimeField('Submit date', blank=True, null=True) @@ -25,6 +31,7 @@ class Build(models.Model): NAME = models.CharField(max_length=50) EMAIL = models.CharField(max_length=50) LINK_BACK = models.TextField(max_length=300, blank=True, null=True) + ERROR_TYPE = models.CharField(max_length=64, default=BuildErrorType.RECIPE) class BuildFailure(models.Model): TASK = models.CharField(max_length=1024) -- 2.1.4