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
Léo-Paul Géneau
slapos.core
Commits
e2e2534a
Commit
e2e2534a
authored
May 10, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hosting subscription now uses instance_slap_interface_workflow
parent
cef377c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
master/bt5/vifib_slap/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/scripts/Person_requestSoftwareInstance.xml
...rface_workflow/scripts/Person_requestSoftwareInstance.xml
+20
-13
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 @
e2e2534a
...
@@ -60,7 +60,7 @@ kwargs = state_change.kwargs\n
...
@@ -60,7 +60,7 @@ kwargs = state_change.kwargs\n
# Required args\n
# Required args\n
# Raise TypeError if all parameters are not provided\n
# Raise TypeError if all parameters are not provided\n
try:\n
try:\n
software_release_url_string =
state_change.
kwargs[\'software_release\']\n
software_release_url_string = kwargs[\'software_release\']\n
software_title = kwargs["software_title"]\n
software_title = kwargs["software_title"]\n
software_type = kwargs["software_type"]\n
software_type = kwargs["software_type"]\n
instance_xml = kwargs["instance_xml"]\n
instance_xml = kwargs["instance_xml"]\n
...
@@ -115,28 +115,35 @@ else:\n
...
@@ -115,28 +115,35 @@ else:\n
activate_kw={\'tag\': tag},\n
activate_kw={\'tag\': tag},\n
)\n
)\n
\n
\n
request_hosting_subscription.edit(\n
promise_kw = {\n
text_content=instance_xml,\n
\'instance_xml\': instance_xml,\n
source_reference=software_type,\n
\'software_type\': software_type,\n
sla_xml=sla_xml,\n
\'sla_xml\': sla_xml,\n
root_software_release_url=software_release_url_string,\n
\'software_release\': software_release_url_string,\n
root_slave=is_slave,\n
\'shared\': is_slave,\n
activate_kw={\'tag\': tag},\n
}\n
)\n
\n
\n
context.REQUEST.set(\'request_hosting_subscription\', request_hosting_subscription)\n
context.REQUEST.set(\'request_hosting_subscription\', request_hosting_subscription)\n
# Change desired state\n
# Change desired state\n
if (root_state == "started"):\n
if (root_state == "started"):\n
request_hosting_subscription.requestStart()\n
request_hosting_subscription.requestStart(
**promise_kw
)\n
elif (root_state == "stopped"):\n
elif (root_state == "stopped"):\n
request_hosting_subscription.requestStop()\n
request_hosting_subscription.requestStop(
**promise_kw
)\n
elif (root_state == "destroyed"):\n
elif (root_state == "destroyed"):\n
request_hosting_subscription.requestDestroy()\n
request_hosting_subscription.requestDestroy(
**promise_kw
)\n
context.REQUEST.set(\'request_hosting_subscription\', None)\n
context.REQUEST.set(\'request_hosting_subscription\', None)\n
else:\n
else:\n
raise ValueError, "state should be started, stopped or destroyed"\n
raise ValueError, "state should be started, stopped or destroyed"\n
\n
\n
request_hosting_subscription.HostingSubscription_requestRootSoftwareInstance(tag, person.getRelativeUrl())\n
request_hosting_subscription.requestInstance(\n
software_release=software_release_url_string,\n
software_title=software_title,\n
software_type=software_type,\n
instance_xml=instance_xml,\n
sla_xml=sla_xml,\n
shared=is_slave,\n
state=root_state,\n
)\n
\n
\n
# Change the state at the end to allow to execute updateLocalRoles only once in the transaction\n
# Change the state at the end to allow to execute updateLocalRoles only once in the transaction\n
validation_state = request_hosting_subscription.getValidationState()\n
validation_state = request_hosting_subscription.getValidationState()\n
...
...
master/bt5/vifib_slap/bt/revision
View file @
e2e2534a
720
721
\ 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