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
23
Merge Requests
23
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
nexedi
slapos.core
Commits
7992770a
Commit
7992770a
authored
Jul 06, 2011
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor code because exist more line that need check if exist the transition start_requested
parent
cd61ba08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/scripts/Person_requestSoftwareInstance.xml
...rface_workflow/scripts/Person_requestSoftwareInstance.xml
+3
-3
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
No files found.
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/scripts/Person_requestSoftwareInstance.xml
View file @
7992770a
...
...
@@ -55,6 +55,7 @@
from DateTime import DateTime\n
person = state_change[\'object\']\n
portal = person.getPortalObject()\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
# Get required arguments\n
kwargs = state_change.kwargs\n
software_release_url_string = state_change.kwargs[\'software_release\']\n
...
...
@@ -114,9 +115,9 @@ if (request_software_instance is None):\n
title=software_title,\n
activate_kw={\'tag\': tag},\n
)\n
if state == \'started\':\n
if state == \'started\'
and isTransitionPossible(request_software_instance, "start_requested")
:\n
software_instance.startRequested()\n
elif state == \'stopped\':\n
elif state == \'stopped\'
and isTransitionPossible(request_software_instance, "stop_requested")
:\n
software_instance.stopRequested() \n
\n
software_release_document = context.portal_catalog.getResultValue(\n
...
...
@@ -177,7 +178,6 @@ if (request_software_instance is None):\n
# Find Computer partition\n
# XXX Link subscript to open order\n
else:\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
# Update existing software instance\n
request_software_instance.edit(\n
text_content=instance_xml,\n
...
...
master/bt5/vifib_slap/bt/revision
View file @
7992770a
390
\ No newline at end of file
391
\ 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