Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
8df0d28d
Commit
8df0d28d
authored
Apr 11, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_upgrader: migrate business template to new format
parent
0d569d03
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
45 deletions
+37
-45
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_getUpgradeBusinessTemplateList.py
...ns/slapos_upgrader/Base_getUpgradeBusinessTemplateList.py
+20
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_getUpgradeBusinessTemplateList.xml
...s/slapos_upgrader/Base_getUpgradeBusinessTemplateList.xml
+0
-24
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_upgradeUpgraderBusinessTemplate.py
...apos_upgrader/ERP5Site_upgradeUpgraderBusinessTemplate.py
+17
-0
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_upgradeUpgraderBusinessTemplate.xml
...pos_upgrader/ERP5Site_upgradeUpgraderBusinessTemplate.xml
+0
-21
No files found.
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_getUpgradeBusinessTemplateList.py
0 → 100644
View file @
8df0d28d
"""
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
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_getUpgradeBusinessTemplateList.xml
View file @
8df0d28d
...
...
@@ -48,30 +48,6 @@
</object>
</value>
</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>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
...
...
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_upgradeUpgraderBusinessTemplate.py
0 → 100644
View file @
8df0d28d
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
))
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/ERP5Site_upgradeUpgraderBusinessTemplate.xml
View file @
8df0d28d
...
...
@@ -48,27 +48,6 @@
</object>
</value>
</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>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment