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
Lisa Casino
slapos.core
Commits
64eeb3b8
Commit
64eeb3b8
authored
Feb 15, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to create update packing list if previous has not been done yet.
parent
085ac44f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
master/bt5/vifib_base/WorkflowTemplateItem/portal_workflow/software_instance_slap_interface_workflow/scripts/SoftwareInstance_requestUpdate.xml
...rface_workflow/scripts/SoftwareInstance_requestUpdate.xml
+9
-4
master/bt5/vifib_base/bt/revision
master/bt5/vifib_base/bt/revision
+1
-1
No files found.
master/bt5/vifib_base/WorkflowTemplateItem/portal_workflow/software_instance_slap_interface_workflow/scripts/SoftwareInstance_requestUpdate.xml
View file @
64eeb3b8
...
...
@@ -69,13 +69,14 @@ for tag in tag_list:\n
return\n
portal_preferences = portal.portal_preferences\n
\n
update_resource_
relative_url
= portal.restrictedTraverse(portal_preferences.getPreferredInstanceUpdateResource()).getUid()\n
update_resource_
uid
= portal.restrictedTraverse(portal_preferences.getPreferredInstanceUpdateResource()).getUid()\n
setup_resource_uid = portal.restrictedTraverse(portal_preferences.getPreferredInstanceSetupResource()).getUid()\n
hosting_resource_uid = portal.restrictedTraverse(portal_preferences.getPreferredInstanceHostingResource()).getUid()\n
\n
service_uid_state_mapping = {\n
setup_resource_uid: [\'stopped\'],\n
hosting_resource_uid: [\'started\', \'delivered\']\n
hosting_resource_uid: [\'started\', \'delivered\'],\n
update_resource_uid: [\'started\', \'stopped\', \'delivered\'],\n
}\n
try:\n
previous_packing_list_line = context.SoftwareInstance_getInstancePackingListLine(state_change)\n
...
...
@@ -83,12 +84,16 @@ except ValueError:\n
# no packing list yet, no need to update\n
return\n
\n
if previous_packing_list_line.getResourceUid() == hosting_resource_uid:\n
resource_uid = previous_packing_list_line.getResourceUid()\n
if resource_uid == hosting_resource_uid:\n
if previous_packing_list_line.getSimulationState() not in service_uid_state_mapping[hosting_resource_uid]:\n
return\n
elif
previous_packing_list_line.getResourceUid()
== setup_resource_uid:\n
elif
resource_uid
== setup_resource_uid:\n
if previous_packing_list_line.getSimulationState() not in service_uid_state_mapping[setup_resource_uid]:\n
return\n
elif resource_uid == update_resource_uid:\n
if previous_packing_list_line.getSimulationState() not in service_uid_state_mapping[update_resource_uid]:\n
return\n
else:\n
# not "supported" resource, eg. cleanup\n
return\n
...
...
master/bt5/vifib_base/bt/revision
View file @
64eeb3b8
382
\ No newline at end of file
383
\ 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