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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos.core
Commits
3bb1b06e
Commit
3bb1b06e
authored
Dec 10, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use custom, non conflicting module cleanup.
parent
de8e4167
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
179 deletions
+57
-179
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/01_ERP5Site_migrateInstanceData.xml
...skins/slapos_upgrader/01_ERP5Site_migrateInstanceData.xml
+8
-2
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/02_ERP5Site_migrateComputerCategory.xml
...s/slapos_upgrader/02_ERP5Site_migrateComputerCategory.xml
+8
-2
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/03_ERP5Site_deleteVifibAccounting.xml
...ins/slapos_upgrader/03_ERP5Site_deleteVifibAccounting.xml
+38
-22
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/05_ERP5Site_deleteVifibAccounting.xml
...ins/slapos_upgrader/05_ERP5Site_deleteVifibAccounting.xml
+0
-67
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/05_ERP5Site_updateLocalRoles.xml
...al_skins/slapos_upgrader/05_ERP5Site_updateLocalRoles.xml
+1
-1
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/06_ERP5Site_reindexWithClear.xml
...al_skins/slapos_upgrader/06_ERP5Site_reindexWithClear.xml
+1
-1
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_deleteGrouped.xml
...eItem/portal_skins/slapos_upgrader/Base_deleteGrouped.xml
+0
-83
master/bt5/slapos_upgrader/bt/revision
master/bt5/slapos_upgrader/bt/revision
+1
-1
No files found.
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/01_ERP5Site_migrateInstanceData.xml
View file @
3bb1b06e
...
...
@@ -50,8 +50,12 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
portal = context.getPortalObject()\n
tag = script.id\n
if portal.portal_activities.countMessageWithTag(tag) >
0:\n
raise TypeError(\'Already running\')\n
method_id = \'Instance_migrateData\'\n
for module in (\n
portal.hosting_subscription_module,\n
...
...
@@ -66,7 +70,9 @@ for module in (\n
)\n
\n
return \'Done.\'\n
</string>
</value>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
...
...
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/02_ERP5Site_migrateComputerCategory.xml
View file @
3bb1b06e
...
...
@@ -50,8 +50,12 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
portal = context.getPortalObject()\n
tag = script.id\n
if portal.portal_activities.countMessageWithTag(tag) >
0:\n
raise TypeError(\'Already running\')\n
method_id = \'Computer_migrateCategory\'\n
for module in (\n
portal.computer_module,\n
...
...
@@ -65,7 +69,9 @@ for module in (\n
)\n
\n
return \'Done.\'\n
</string>
</value>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
...
...
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/03_ERP5Site_deleteVifibAccounting.xml
View file @
3bb1b06e
...
...
@@ -52,36 +52,52 @@
<key>
<string>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
BLACKLIST_RELATIVE_URL_LIST = (\n
\'accounting_module/template_sale_invoice_transaction\',\n
\'open_sale_order_module/slapos_accounting_open_sale_order_line_template\',\n
\'open_sale_order_module/slapos_accounting_open_sale_order_template\',\n
\'sale_packing_list_module/slapos_accounting_instance_delivery_line_template\',\n
\'sale_packing_list_module/slapos_accounting_instance_delivery_template\',\n
\'sale_trade_condition_module/payzen_sale_trade_condition\',\n
\'sale_trade_condition_module/slapos_aggregated_trade_condition\',\n
\'sale_trade_condition_module/slapos_consumption_trade_condition\',\n
\'sale_trade_condition_module/slapos_subscription_trade_condition\',\n
)\n
portal = context.getPortalObject()\n
tag = script.id\n
if portal.portal_activities.countMessageWithTag(tag) >
0:\n
raise TypeError(\'Already running\')\n
method_id = \'Base_deleteGrouped\'\n
for module in (\n
portal.accounting_module,\n
portal.internal_packing_list_module,\n
portal.open_sale_order_module,\n
portal.portal_simulation,\n
portal.purchase_packing_list_module,\n
portal.sale_order_module,\n
portal.sale_packing_list_module,\n
portal.sale_trade_condition_module,\n
):\n
portal.portal_catalog.searchAndActivate(\n
parent_uid=module.getUid(),\n
method_id=method_id,\n
packet_size=20,\n
activity_count=1,\n
activate_kw={\'tag\': tag}\n
module_list = (\n
portal.accounting_module,\n
portal.internal_packing_list_module,\n
portal.open_sale_order_module,\n
portal.portal_simulation,\n
portal.purchase_packing_list_module,\n
portal.sale_order_module,\n
portal.sale_packing_list_module,\n
portal.sale_trade_condition_module,\n
)\n
return \'Done.\'\n
tag = script.id\n
if bg:\n
if portal.portal_activities.countMessageWithTag(tag) >
0:\n
raise TypeError(\'Already running\')\n
for module in module_list:\n
getattr(module.activate(tag=tag), \'03_ERP5Site_deleteVifibAccounting\')(bg=0)\n
return \'Done.\'\n
\n
deleted = False\n
if context in module_list:\n
id_list = [q.getId() for q in context.contentValues()[:20] if q.getRelativeUrl() not in BLACKLIST_RELATIVE_URL_LIST]\n
if id_list:\n
deleted = True\n
context.deleteContent(id_list)\n
\n
if deleted:\n
getattr(context.activate(tag=tag), \'03_ERP5Site_deleteVifibAccounting\')(bg=0)\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
bg=1
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/05_ERP5Site_deleteVifibAccounting.xml
deleted
100644 → 0
View file @
de8e4167
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
return getattr(context.getPortalObject(), \'03_ERP5Site_deleteVifibAccounting\')()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
05_ERP5Site_deleteVifibAccounting
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/0
6
_ERP5Site_updateLocalRoles.xml
→
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/0
5
_ERP5Site_updateLocalRoles.xml
View file @
3bb1b06e
...
...
@@ -79,7 +79,7 @@ return \'Done.\'\n
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
0
6
_ERP5Site_updateLocalRoles
</string>
</value>
<value>
<string>
0
5
_ERP5Site_updateLocalRoles
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/0
7
_ERP5Site_reindexWithClear.xml
→
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/0
6
_ERP5Site_reindexWithClear.xml
View file @
3bb1b06e
...
...
@@ -60,7 +60,7 @@ return \'Done.\'\n
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
0
7
_ERP5Site_reindexWithClear
</string>
</value>
<value>
<string>
0
6
_ERP5Site_reindexWithClear
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/Base_deleteGrouped.xml
deleted
100644 → 0
View file @
de8e4167
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
BLACKLIST_RELATIVE_URL_LIST = (\n
\'accounting_module/template_sale_invoice_transaction\',\n
\'open_sale_order_module/slapos_accounting_open_sale_order_line_template\',\n
\'open_sale_order_module/slapos_accounting_open_sale_order_template\',\n
\'sale_packing_list_module/slapos_accounting_instance_delivery_line_template\',\n
\'sale_packing_list_module/slapos_accounting_instance_delivery_template\',\n
\'sale_trade_condition_module/payzen_sale_trade_condition\',\n
\'sale_trade_condition_module/slapos_aggregated_trade_condition\',\n
\'sale_trade_condition_module/slapos_consumption_trade_condition\',\n
\'sale_trade_condition_module/slapos_subscription_trade_condition\',\n
)\n
\n
document = context\n
if document.getRelativeUrl() in BLACKLIST_RELATIVE_URL_LIST:\n
script.log(\'Not deleted blacklisted %s\' % document.getRelativeUrl())\n
return\n
document.getParentValue().deleteContent(document.getId())\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_deleteGrouped
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_upgrader/bt/revision
View file @
3bb1b06e
45
\ No newline at end of file
46
\ No newline at end of file
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