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 = 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
tmpl = self._build_one(request, project, scm.name + ".", scm)
tmpl += 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=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 6a61507..9df4ccd 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
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel