Commit 91fa45cf authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_erp5: Fixup Name Conventions and some cleanup

parent 2f116cc2
......@@ -40,7 +40,7 @@
</item>
<item>
<key> <string>configuration_after_script_id</string> </key>
<value> <string>BusinessConfiguration_invokeSlapOSMasterPromiseAlarmList</string> </value>
<value> <string>BusinessConfiguration_runPostUpgradeConsistency</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessConfiguration_invokeSlapOSMasterPromiseAlarmList</string> </value>
<value> <string>BusinessConfiguration_runPostUpgradeConsistency</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -32,7 +32,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PreferenceToolSlapOSConstraintPreference</string> </value>
<value> <string>PreferenceSlapOSConstraintPreference</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -42,7 +42,7 @@
</item>
<item>
<key> <string>script_id</string> </key>
<value> <string>PreferenceTool_checkConversionServerConsistency</string> </value>
<value> <string>SystemPreference_checkConversionServerConsistency</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -42,7 +42,7 @@
</item>
<item>
<key> <string>script_id</string> </key>
<value> <string>PreferenceTool_checkSystemPreferenceConsistency</string> </value>
<value> <string>SystemPreference_checkSystemPreferenceConsistency</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PreferenceToolConversionServerConstraintPreference</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PreferenceTool_checkConversionServerConsistency</string> </value>
<value> <string>SystemPreference_checkConversionServerConsistency</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -6,17 +6,24 @@
if context.getPortalType() not in ["System Preference"]:
return []
error_list = []
if context.getId() == "slapos_default_system_preference" and context.getPreferenceState() != "global":
error_list.append(
"The Default System preference globally enabled shouldn't be slapos_default_system_preference" % context.getId())
if fixit:
context.globalEnable(comment="Enabled by PreferenceTool_checkSystemPreferenceConsistency")
if context.getPreferenceState() != "global":
return []
error_list = []
if context.getId() != "slapos_default_system_preference":
error_list.append(
"The Default System preference globally enabled shouldn't be %s but slapos_default_system_preference" % context.getId())
if fixit:
context.disable(comment="Disabled by PreferenceTool_checkSystemPreferenceConsistency")
preference_method_list = [
"getPreferredHateoasUrl",
"getPreferredPayzenPaymentServiceReference",
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PreferenceTool_checkSystemPreferenceConsistency</string> </value>
<value> <string>SystemPreference_checkSystemPreferenceConsistency</string> </value>
</item>
</dictionary>
</pickle>
......
PreferenceToolSlapOSConstraintPreference
PreferenceToolConversionServerConstraintPreference
PreferenceSlapOSConstraintPreference
CertificateAuthorityToolConsistencyConstraint
SlapOSModuleIdGeneratorConstraint
MemcachedToolServerConstraint
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment