From nobody Fri Apr 26 03:07:40 2024 Delivered-To: importer@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; dkim=fail; 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=1556795896; cv=none; d=zoho.com; s=zohoarc; b=TsT5RZ1CsSWUwNy76lDaiWgbNtdkt8Eo5xZXm+qV2KZIbPFQAtfHor4TJerSC7HmolJxx/lWdyOUUwaIEoddwYrwXRx8fFT/sDTC+yEutdHMO+S6PMI2nU4DTI75yZSsORmE++d9hZOymQjZasBZH+6P0HXzUZA/t+eipxLDaRY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556795896; 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=E3UsS+fOJLXrEMvMIl+F+cS9oOVFko6CPyHQftE0ol0=; b=ljeRKF2/tWXidqoIyCjihNqrTJlUwo8xIAZ9zoj5OfU7hhc/s9RpG009z7Mmo8cuNIvDR7+dQdHG0GA5sVE6gtFJY9HhkRU0Sfi36KfU8gYdswYx+dGqFNOTtw4lOLgr5Zr4Ewo9QMwS2rkg/2bmIh6CtwLX3SExj9dVCiOYrgs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1556795896275289.39267815039466; Thu, 2 May 2019 04:18:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0AFB8330272; Thu, 2 May 2019 11:18:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0031A39C1; Thu, 2 May 2019 11:18:14 +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 E677918089CA; Thu, 2 May 2019 11:18:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x42BIEpO008953 for ; Thu, 2 May 2019 07:18:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 51D60174B1; Thu, 2 May 2019 11:18:14 +0000 (UTC) Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4BF4339C1 for ; Thu, 2 May 2019 11:18:11 +0000 (UTC) Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1EB0630832D1 for ; Thu, 2 May 2019 11:18:11 +0000 (UTC) Received: by mail-oi1-f180.google.com with SMTP id 143so1367221oii.4 for ; Thu, 02 May 2019 04:18:11 -0700 (PDT) Received: from localhost.localdomain ([198.59.53.9]) by smtp.gmail.com with ESMTPSA id o1sm19095697otj.11.2019.05.02.04.18.09 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 04:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZYg498xb0T2jbSOuJK/pwY+LZaRs8dyeKZFqQYfIBvI=; b=cnFOWndhKnQmN8RfO5DA5VHxJX37OgEHu2xCc4GLbUWie7vNQ0iw23Ttkd2DRK7szK +9lN2Mt9iN1V4aF+YVPazhNpAsW2QbEtZpb7n4iSbKbbgnbAl+NW58N2c3tQvSdiDb14 HVvNvQPN2P20EfrGQuxA39gC0LlHtZKgVL7370Cq6sx+S6nabWWPJOBjIjY2E3OH19Mw GIw4juDdCwxPEWLNPgWugWM5F1D0P0RnjsfqiJoNI7e38vml2T0Np5ZP1J+x1EJIudWS zr87Kr45hhsS9qW81LsfOaQEPBqzg/JA76T3KlbLfX4dgKcWBpp7noDS6CcTPQbQAvrk wmAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ZYg498xb0T2jbSOuJK/pwY+LZaRs8dyeKZFqQYfIBvI=; b=tPbLaL8MjCcQPoLa0Z0/lfsaULr4SEthOCWLORc5fPDxrb/oxweXUNl6J0rP2P0K3f 5jrWy7otZp6EMfCwXMweSaomHaTvlu7HXlGiEZnxlpLsu2pL3PsWD9ivyq/VNzLRgm76 c6KMj/0lVGCd3lTzAlvlVbZXJIqzgdx2f9L0NzBnVEXd2WnRHOaIoyvUPmJYUMh0aCq5 vMXripdmFyNKciBt9Tcm7iIsHyhDj6gr+HxQEGNv0nV/V0j58USJHVW+CavgnhedLAC0 WX936Y0JP6vvjlk430ns5Af0jKdRpPofJL/2okbnaC1n3uujWE3Dk+2V6A/f+RWVE27c iJxQ== X-Gm-Message-State: APjAAAXhrCbAPzTytcjMQNdajxT5rA1nhfYJFeNJUU3aBmL9YfW3w8Ta GjKxdJ2cSKqgRuzwJVjxzyoupcWD8P0= X-Google-Smtp-Source: APXvYqyiy6DXhtCr67HVDuqF7Pji8nV9ZVHC6mXVPzY3lzC3V8/ojNYyYK6Q4WCCPapbsKSd3/M98Q== X-Received: by 2002:aca:d5cc:: with SMTP id m195mr1851375oig.167.1556795890351; Thu, 02 May 2019 04:18:10 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Thu, 2 May 2019 05:17:53 -0600 Message-Id: <20190502111804.15843-7-pbonzini@redhat.com> In-Reply-To: <20190502111804.15843-1-pbonzini@redhat.com> References: <20190502111804.15843-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 02 May 2019 11:18:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 02 May 2019 11:18:11 +0000 (UTC) for IP:'209.85.167.180' DOMAIN:'mail-oi1-f180.google.com' HELO:'mail-oi1-f180.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.126 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS) 209.85.167.180 mail-oi1-f180.google.com 209.85.167.180 mail-oi1-f180.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.84 on 10.5.110.44 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 06/17] 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 02 May 2019 11:18:15 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" We would like to split 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. Signed-off-by: Paolo Bonzini --- 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 7d43715..6f172d5 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 return self._build_one(request, project, scm.name + ".", scm) =20 _loaded_modules =3D {} 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 e390e30..caafc19 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