From nobody Tue May 13 19:53:25 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1555604518; cv=none; d=zoho.com; s=zohoarc; b=LmzRDpoucNGpnM/wHw2I3dhIW/PpZKe9CbE2zMbgAY16Di0Y8opN8KmxJ00hGevgN64d2HXuslukan/334Wesvh8bpTRKktR3nGlVdOtNg7JF7z8rdpJ5zGhgsONaC/hUPvxe+uc8yauWIeSzYnJIkIyloAf8dBvfWSpHeFwUDg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555604518; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=f0C/J3qNBqMt3lr+vdvFGk+Na8UR/G4M9jJsJN3Whek=; b=Zyo/lasIBR69G+UsDDyq4XGMnUTL1uuh9+fBZYJg4YgjCT4NyVDTUG45/1LWeqdj1KSmcGpf5hFQp4OXgZTwwygrLZDuAV3DLtzv2M+dP3bZjB2txoC6Hy6j/YdPtfkdvD/XJ9eIEoTGsIodZHyDkgzEuvQiIhYu6TDRrBLFNz4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555604518832863.5014424545432; Thu, 18 Apr 2019 09:21:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EB4CF74A7; Thu, 18 Apr 2019 16:21:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 836CD5D9C5; Thu, 18 Apr 2019 16:21:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 799024EA71; Thu, 18 Apr 2019 16:21:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3IGLut3009187 for ; Thu, 18 Apr 2019 12:21:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 497F260BEC; Thu, 18 Apr 2019 16:21:56 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-46.ams2.redhat.com [10.36.112.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F12360BE5 for ; Thu, 18 Apr 2019 16:21:55 +0000 (UTC) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Thu, 18 Apr 2019 18:21:41 +0200 Message-Id: <20190418162146.5695-6-pbonzini@redhat.com> In-Reply-To: <20190418162146.5695-1-pbonzini@redhat.com> References: <20190418162146.5695-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 05/10] mods: rename project_property_schema to project_config_schema X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 18 Apr 2019 16:21:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" We would like to split plugin properties from configurations, and place them in two separate fields of the project. As a start, do not use "property" when referring to the module schemas. The fact that configuration is stored as a property is (more or less) an implementation detail. --- mod.py | 8 ++++---- mods/email.py | 2 +- mods/git.py | 2 +- mods/testing.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mod.py b/mod.py index 696dda1..319d4d3 100644 --- a/mod.py +++ b/mod.py @@ -21,7 +21,7 @@ class PatchewModule(object): """ Module base class """ name =3D None # The name of the module, must be unique default_config =3D "" # The default config string - project_property_schema =3D None + project_config_schema =3D None =20 def get_model(self): # ALways read from DB to accept configuration update in-flight @@ -145,9 +145,9 @@ class PatchewModule(object): assert False =20 def build_config_html(self, request, project): - assert not isinstance(self.project_property_schema, StringSchema) - assert not isinstance(self.project_property_schema, IntegerSchema) - scm =3D self.project_property_schema + assert not isinstance(self.project_config_schema, StringSchema) + assert not isinstance(self.project_config_schema, IntegerSchema) + scm =3D self.project_config_schema tmpl =3D self._build_one(request, project, scm.name + ".", scm) tmpl +=3D self._render_template(request, project, TMPL_END) return tmpl diff --git a/mods/email.py b/mods/email.py index 411bc4b..14553f0 100644 --- a/mods/email.py +++ b/mods/email.py @@ -88,7 +88,7 @@ Email information is configured in "INI" style: required=3DTrue), ]) =20 - project_property_schema =3D \ + project_config_schema =3D \ ArraySchema("email", desc=3D"Configuration for email module", members=3D[ MapSchema("notifications", "Email notifications", diff --git a/mods/git.py b/mods/git.py index 89e711d..110f261 100644 --- a/mods/git.py +++ b/mods/git.py @@ -63,7 +63,7 @@ class GitModule(PatchewModule): allowed_groups =3D ('importers', ) result_data_serializer_class =3D ResultDataSerializer =20 - project_property_schema =3D \ + project_config_schema =3D \ ArraySchema("git", desc=3D"Configuration for git module", members=3D[ StringSchema("push_to", "Push remote", diff --git a/mods/testing.py b/mods/testing.py index 6a61507..9df4ccd 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -91,7 +91,7 @@ class TestingModule(PatchewModule): required=3DTrue), ]) =20 - project_property_schema =3D \ + project_config_schema =3D \ ArraySchema("testing", desc=3D"Configuration for testing module", members=3D[ MapSchema("tests", "Tests", --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel