Commit 8df0d28d authored by Alain Takoudjou's avatar Alain Takoudjou

slapos_upgrader: migrate business template to new format

parent 0d569d03
"""
This script should returns always two list of Business Template.
- The first list is to resolve dependencies and upgrade.
- The second list is what you want to keep. This is useful if we want to keep
a old business template without updating it and without removing it
"""
portal = context.getPortalObject()
bt5_update_catalog_list = ('erp5_ingestion_mysql_innodb_catalog',
'slapos_cloud', 'erp5_accounting',
'erp5_movement_table_catalog')
bt5_id_list = bt5_update_catalog_list + ('slapos_erp5',)
keep_bt5_id_list = ['erp5_ui_test',
'erp5_ui_test_core',
'slapos_category',
'erp5_secure_payment']
return bt5_id_list, keep_bt5_id_list
...@@ -48,30 +48,6 @@ ...@@ -48,30 +48,6 @@
</object> </object>
</value> </value>
</item> </item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
This script should returns always two list of Business Template.\n
- The first list is to resolve dependencies and upgrade.\n
- The second list is what you want to keep. This is useful if we want to keep \n
a old business template without updating it and without removing it\n
"""\n
portal = context.getPortalObject()\n
\n
bt5_update_catalog_list = (\'erp5_ingestion_mysql_innodb_catalog\',\n
\'slapos_cloud\', \'erp5_accounting\',\n
\'erp5_movement_table_catalog\')\n
\n
bt5_id_list = bt5_update_catalog_list + (\'slapos_erp5\',)\n
\n
keep_bt5_id_list = [\'erp5_ui_test\',\n
\'erp5_ui_test_core\',\n
\'slapos_category\',\n
\'erp5_secure_payment\']\n
\n
return bt5_id_list, keep_bt5_id_list\n
</string> </value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
......
portal = context.getPortalObject()
portal_type = 'Template Tool'
tag = 'upgrade_upgrader_%s' % random.randint(0, 2000)
method_kw = {'bt5_list':['erp5_upgrader', 'slapos_upgrader'],
'deprecated_after_script_dict': None,
'deprecated_reinstall_set': None,
'dry_run': False,
'delete_orphaned': False,
'keep_bt5_id_set': [],
'update_catalog': False}
portal.portal_catalog.searchAndActivate(
portal_type=portal_type,
method_id='upgradeSite',
method_kw=method_kw,
activate_kw=dict(tag=tag, priority=2))
...@@ -48,27 +48,6 @@ ...@@ -48,27 +48,6 @@
</object> </object>
</value> </value>
</item> </item>
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
portal_type = \'Template Tool\'\n
tag = \'upgrade_upgrader_%s\' % random.randint(0, 2000)\n
method_kw = {\'bt5_list\':[\'erp5_upgrader\', \'slapos_upgrader\'],\n
\'deprecated_after_script_dict\': None,\n
\'deprecated_reinstall_set\': None,\n
\'dry_run\': False,\n
\'delete_orphaned\': False,\n
\'keep_bt5_id_set\': [],\n
\'update_catalog\': False}\n
\n
\n
portal.portal_catalog.searchAndActivate(\n
portal_type=portal_type,\n
method_id=\'upgradeSite\',\n
method_kw=method_kw,\n
activate_kw=dict(tag=tag, priority=2))\n
</string> </value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string></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