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
0
Merge Requests
0
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
Rafael Monnerat
slapos.core
Commits
665ab6a5
Commit
665ab6a5
authored
Nov 08, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Slave local roles trigger.
Interaction workflow are required to automate recalculation.
parent
614ac6a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
1 deletion
+52
-1
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+4
-0
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSLocalPermissionSlapOSInteractionWorkflow.py
...tem/testSlapOSLocalPermissionSlapOSInteractionWorkflow.py
+45
-0
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interactions/SoftwareInstance_edit.xml
...teraction_workflow/interactions/SoftwareInstance_edit.xml
+1
-0
master/bt5/slapos_erp5/bt/revision
master/bt5/slapos_erp5/bt/revision
+1
-1
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
...5/slapos_erp5/bt/template_portal_type_workflow_chain_list
+1
-0
No files found.
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
665ab6a5
...
...
@@ -19,6 +19,10 @@
<type>
Person
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Slave Instance
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Software Installation
</type>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
...
...
master/bt5/slapos_erp5/TestTemplateItem/testSlapOSLocalPermissionSlapOSInteractionWorkflow.py
View file @
665ab6a5
...
...
@@ -216,3 +216,48 @@ class TestSlapOSLocalPermissionSlapOSInteractionWorkflow(
computer
.
getReference
(),
hosting_subscription
.
getReference
()],
False
)
self
.
assertSecurityGroup
(
partition
,
[
self
.
user_id
,
hosting_subscription
.
getReference
()],
True
)
def
test_SlaveInstance_setSpecialise
(
self
):
slave_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Slave Instance'
)
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
],
False
)
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
.
newContent
(
portal_type
=
'Hosting Subscription'
,
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
slave_instance
.
edit
(
specialise
=
hosting_subscription
.
getRelativeUrl
())
transaction
.
commit
()
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
hosting_subscription
.
getReference
()],
False
)
def
test_SlaveInstance_setAggregate
(
self
):
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
.
newContent
(
portal_type
=
'Hosting Subscription'
,
reference
=
'TESTHS-%s'
%
self
.
generateNewId
())
software_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Software Instance'
,
reference
=
'TESTSO-%s'
%
self
.
generateNewId
(),
specialise
=
hosting_subscription
.
getRelativeUrl
())
software_instance
.
validate
()
slave_instance
=
self
.
portal
.
software_instance_module
.
newContent
(
portal_type
=
'Slave Instance'
,
specialise
=
hosting_subscription
.
getRelativeUrl
())
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
hosting_subscription
.
getReference
()],
False
)
computer
=
self
.
portal
.
computer_module
.
template_computer
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
computer
.
edit
(
reference
=
'TESTC-%s'
%
self
.
generateNewId
())
partition
=
computer
.
newContent
(
portal_type
=
'Computer Partition'
)
software_instance
.
edit
(
aggregate
=
partition
.
getRelativeUrl
())
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
partition
,
'busy'
)
self
.
tic
()
slave_instance
.
edit
(
aggregate
=
partition
.
getRelativeUrl
())
self
.
assertSecurityGroup
(
slave_instance
,
[
self
.
user_id
,
'G-COMPANY'
,
software_instance
.
getReference
(),
computer
.
getReference
(),
hosting_subscription
.
getReference
()],
False
)
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/local_permission_slapos_interaction_workflow/interactions/SoftwareInstance_edit.xml
View file @
665ab6a5
...
...
@@ -69,6 +69,7 @@
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<list>
<string>
Slave Instance
</string>
<string>
Software Instance
</string>
</list>
</value>
...
...
master/bt5/slapos_erp5/bt/revision
View file @
665ab6a5
66
\ No newline at end of file
67
\ No newline at end of file
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
View file @
665ab6a5
...
...
@@ -3,5 +3,6 @@ Computer Network | local_permission_slapos_interaction_workflow
Computer | local_permission_slapos_interaction_workflow
Hosting Subscription | local_permission_slapos_interaction_workflow
Person | local_permission_slapos_interaction_workflow
Slave Instance | local_permission_slapos_interaction_workflow
Software Installation | local_permission_slapos_interaction_workflow
Software Instance | local_permission_slapos_interaction_workflow
\ 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