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
16
Merge Requests
16
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
6a6fc065
Commit
6a6fc065
authored
Aug 05, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bang the requester instance if the connection parameters are updated.
parent
d33ca116
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
2 deletions
+98
-2
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSCloudWorkflow.py
.../slapos_cloud/TestTemplateItem/testSlapOSCloudWorkflow.py
+21
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/scripts/RequestedInstance_bangResquesterInstance.xml
...flow/scripts/RequestedInstance_bangResquesterInstance.xml
+75
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/transitions/update_connection.xml
...slap_interface_workflow/transitions/update_connection.xml
+1
-1
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
No files found.
master/bt5/slapos_cloud/TestTemplateItem/testSlapOSCloudWorkflow.py
View file @
6a6fc065
...
...
@@ -1914,6 +1914,27 @@ class TestSlapOSCoreSoftwareInstanceRequest(testSlapOSMixin):
requested_instance2
.
getSlaXml
())
self
.
assertEqual
(
bang_amount
+
1
,
self
.
_countBang
(
requested_instance
))
def
test_update_connection_bang_requester
(
self
):
# XXX Romain Couscous
request_kw
=
self
.
request_kw
.
copy
()
request_kw
[
'software_title'
]
=
self
.
generateNewSoftwareTitle
()
self
.
software_instance
.
requestInstance
(
**
request_kw
)
requested_instance
=
self
.
software_instance
.
REQUEST
.
get
(
'request_instance'
)
self
.
tic
()
bang_amount
=
self
.
_countBang
(
self
.
software_instance
)
connection_xml
=
self
.
generateSafeXml
()
requested_instance
.
updateConnection
(
connection_xml
=
connection_xml
)
transaction
.
commit
()
self
.
assertEqual
(
bang_amount
+
1
,
self
.
_countBang
(
self
.
software_instance
))
class
TestSlapOSCorePersonRequest
(
testSlapOSMixin
):
def
afterSetUp
(
self
):
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/scripts/RequestedInstance_bangResquesterInstance.xml
0 → 100644
View file @
6a6fc065
<?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>
instance = state_change[\'object\']\n
portal = instance.getPortalObject()\n
\n
for requester_instance in portal.portal_catalog(\n
portal_type="Software Instance",\n
default_predecessor_uid=instance.getUid()):\n
requester_instance.getObject().bang(\n
bang_tree=False,\n
comment="%s parameters changed" % instance.getRelativeUrl())\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
RequestedInstance_bangResquesterInstance
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/instance_slap_interface_workflow/transitions/update_connection.xml
View file @
6a6fc065
...
...
@@ -46,7 +46,7 @@
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
RequestedInstance_bangResquesterInstance
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
master/bt5/slapos_cloud/bt/revision
View file @
6a6fc065
291
\ No newline at end of file
292
\ 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