Commit 66cb8262 authored by Alain Takoudjou's avatar Alain Takoudjou

migrate slapos_configurator to new bt format

parent 786eb339
"""
Solve all alarms which starts with id as "promise_vifib*".
(rafael): This approach could be generalized on
configurator level, by providing a list of
alarms to be invoked always.
"""
alarm_to_solve_list = ['promise_certificate_autority_tool',
'promise_conversion_server',
'promise_kumofs_server',
'promise_mailhost_configuration',
'promise_memcached_server']
for alarm in context.portal_alarms.contentValues():
alarm_id = alarm.getId()
if alarm_id.startswith("promise_slapos") or \
alarm_id in alarm_to_solve_list:
context.log("Solve %s" % alarm_id)
alarm.solve()
...@@ -48,29 +48,6 @@ ...@@ -48,29 +48,6 @@
</object> </object>
</value> </value>
</item> </item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Solve all alarms which starts with id as "promise_vifib*".\n
\n
(rafael): This approach could be generalized on \n
configurator level, by providing a list of \n
alarms to be invoked always.\n
"""\n
alarm_to_solve_list = [\'promise_certificate_autority_tool\',\n
\'promise_conversion_server\',\n
\'promise_kumofs_server\',\n
\'promise_mailhost_configuration\',\n
\'promise_memcached_server\']\n
\n
for alarm in context.portal_alarms.contentValues():\n
alarm_id = alarm.getId()\n
if alarm_id.startswith("promise_slapos") or \\\n
alarm_id in alarm_to_solve_list:\n
context.log("Solve %s" % alarm_id)\n
alarm.solve()\n
</string> </value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
......
configuration_save = context.restrictedTraverse(configuration_save_url)
bt5_update_catalog_list = ('erp5_ingestion_mysql_innodb_catalog',
'slapos_cloud', 'erp5_accounting',
'erp5_movement_table_catalog')
bt5_installation_list = bt5_update_catalog_list + ('slapos_erp5',)
for name in bt5_installation_list:
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",
title=name, bt5_id=name,
update_catalog=(name in bt5_update_catalog_list))
...@@ -48,22 +48,6 @@ ...@@ -48,22 +48,6 @@
</object> </object>
</value> </value>
</item> </item>
<item>
<key> <string>_body</string> </key>
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n
bt5_update_catalog_list = (\'erp5_ingestion_mysql_innodb_catalog\',\n
\'slapos_cloud\', \'erp5_accounting\',\n
\'erp5_movement_table_catalog\')\n
\n
bt5_installation_list = bt5_update_catalog_list + (\'slapos_erp5\',)\n
\n
for name in bt5_installation_list:\n
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n
title=name, bt5_id=name,\n
update_catalog=(name in bt5_update_catalog_list))\n
</string> </value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>configuration_save_url=None, **kw</string> </value> <value> <string>configuration_save_url=None, **kw</string> </value>
......
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