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
Cédric Le Ninivin
slapos.core
Commits
8227cf75
Commit
8227cf75
authored
Dec 05, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify.
parent
856b185c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
20 deletions
+15
-20
master/bt5/slapos_upgrader/ExtensionTemplateItem/SlapOSUpgrader.py
...5/slapos_upgrader/ExtensionTemplateItem/SlapOSUpgrader.py
+13
-13
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/00_ERP5Site_migrateUrlString.xml
...al_skins/slapos_upgrader/00_ERP5Site_migrateUrlString.xml
+1
-6
master/bt5/slapos_upgrader/bt/revision
master/bt5/slapos_upgrader/bt/revision
+1
-1
No files found.
master/bt5/slapos_upgrader/ExtensionTemplateItem/SlapOSUpgrader.py
View file @
8227cf75
from
Products.ERP5Type.Base
import
WorkflowMethod
from
Products.ERP5Type.Base
import
WorkflowMethod
def
Instance_migrateUrlString
(
obj
):
def
Instance_migrateUrlString
(
self
):
@
WorkflowMethod
.
disable
@
WorkflowMethod
.
disable
def
real
(
obj
):
def
real
(
self
):
property_id
=
'root_software_release_url'
property_id
=
'root_software_release_url'
if
obj
.
getPortalType
()
not
in
(
'Hosting Subscription'
,
'Software Instance'
,
'Slave Instance'
):
if
self
.
getPortalType
()
not
in
(
'Hosting Subscription'
,
'Software Instance'
,
'Slave Instance'
):
raise
TypeError
(
obj
.
getPortalType
())
raise
TypeError
(
self
.
getPortalType
())
old_url
=
getattr
(
obj
.
aq_base
,
property_id
,
None
)
old_url
=
getattr
(
self
.
aq_base
,
property_id
,
None
)
new_url
=
obj
.
getUrlString
()
new_url
=
self
.
getUrlString
()
if
not
old_url
and
not
new_url
:
if
not
old_url
and
not
new_url
:
raise
ValueError
(
'%s has no url defined at all'
%
obj
.
getPath
())
raise
ValueError
(
'%s has no url defined at all'
%
self
.
getPath
())
if
old_url
:
if
old_url
:
obj
.
setUrlString
(
old_url
)
self
.
setUrlString
(
old_url
)
assert
(
obj
.
getUrlString
()
==
old_url
)
assert
(
self
.
getUrlString
()
==
old_url
)
delattr
(
obj
.
aq_base
,
property_id
)
delattr
(
self
.
aq_base
,
property_id
)
if
type
(
obj
)
==
type
([]):
if
type
(
self
)
==
type
([]):
for
o
in
obj
:
for
o
in
self
:
real
(
o
[
0
])
real
(
o
[
0
])
else
:
else
:
real
(
obj
)
real
(
self
)
master/bt5/slapos_upgrader/SkinTemplateItem/portal_skins/slapos_upgrader/00_ERP5Site_migrateUrlString.xml
View file @
8227cf75
...
@@ -62,12 +62,7 @@ for module in (\n
...
@@ -62,12 +62,7 @@ for module in (\n
max_depth=1,\n
max_depth=1,\n
min_depth=1,\n
min_depth=1,\n
max_retry=0,\n
max_retry=0,\n
activity_count=50,\n
activate_kw={\'tag\': script.id}\n
activate_kw={\n
\'tag\': script.id,\n
\'group_method_id\': method_id,\n
\'group_method_cost\': 1./50, # fire up 50 activities in same transaction\n
}\n
)\n
)\n
\n
\n
return \'Done.\'\n
return \'Done.\'\n
...
...
master/bt5/slapos_upgrader/bt/revision
View file @
8227cf75
7
8
\ No newline at end of file
\ 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