[Patchew-devel] [PATCH 06/17] mods: rename project_property_schema to project_config_schema

Paolo Bonzini pbonzini at redhat.com
Thu May 2 11:17:53 UTC 2019


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 <pbonzini at redhat.com>
---
 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 = None # The name of the module, must be unique
     default_config = "" # The default config string
-    project_property_schema = None
+    project_config_schema = None
 
     def get_model(self):
         # ALways read from DB to accept configuration update in-flight
@@ -145,9 +145,9 @@ class PatchewModule(object):
         assert False
 
     def build_config_html(self, request, project):
-        assert not isinstance(self.project_property_schema, StringSchema)
-        assert not isinstance(self.project_property_schema, IntegerSchema)
-        scm = self.project_property_schema
+        assert not isinstance(self.project_config_schema, StringSchema)
+        assert not isinstance(self.project_config_schema, IntegerSchema)
+        scm = self.project_config_schema
         return self._build_one(request, project, scm.name + ".", scm)
 
 _loaded_modules = {}
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=True),
                     ])
 
-    project_property_schema = \
+    project_config_schema = \
         ArraySchema("email", desc="Configuration for email module",
                     members=[
                         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 = ('importers', )
     result_data_serializer_class = ResultDataSerializer
 
-    project_property_schema = \
+    project_config_schema = \
         ArraySchema("git", desc="Configuration for git module",
                     members=[
                         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=True),
                     ])
 
-    project_property_schema = \
+    project_config_schema = \
         ArraySchema("testing", desc="Configuration for testing module",
                     members=[
                         MapSchema("tests", "Tests",
-- 
2.21.0





More information about the Patchew-devel mailing list