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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
ac0b28fc
Commit
ac0b28fc
authored
Nov 19, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add invoicing_workflow to Hosting Subscription.
parent
dfed1964
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
154 additions
and
2 deletions
+154
-2
master/bt5/slapos_accounting/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+1
-1
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingInteractionWorkflow.py
...stTemplateItem/testSlapOSAccountingInteractionWorkflow.py
+55
-0
master/bt5/slapos_accounting/WorkflowTemplateItem/portal_workflow/slapos_accounting_interaction_workflow/interactions/HostingSubscription_changePromiseState.xml
...w/interactions/HostingSubscription_changePromiseState.xml
+96
-0
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
master/bt5/slapos_accounting/bt/template_portal_type_workflow_chain_list
...os_accounting/bt/template_portal_type_workflow_chain_list
+1
-0
No files found.
master/bt5/slapos_accounting/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
ac0b28fc
<workflow_chain>
<chain>
<type>
Hosting Subscription
</type>
<workflow>
slapos_accounting_interaction_workflow
</workflow>
<workflow>
slapos_accounting_interaction_workflow
, slapos_api_invoicing_workflow
</workflow>
</chain>
<chain>
<type>
Sale Packing List
</type>
...
...
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingInteractionWorkflow.py
View file @
ac0b28fc
...
...
@@ -278,3 +278,58 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by D
submit_spl
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
],
'Visited by Delivery_calculate'
)
def
test_HostingSubscription_changePromise
(
self
):
new_id
=
self
.
generateNewId
()
subscription
=
self
.
portal
.
hosting_subscription_module
.
newContent
(
portal_type
=
'Hosting Subscription'
,
title
=
"Subscription %s"
%
new_id
,
reference
=
"TESTSUB-%s"
%
new_id
,
)
subscription
.
validate
()
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'diverged'
)
request_kw
=
dict
(
software_release
=
'http://example.org'
,
software_type
=
'http://example.org'
,
instance_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
False
,
)
subscription
.
converge
()
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'solved'
)
subscription
.
requestStop
(
**
request_kw
)
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'diverged'
)
subscription
.
converge
()
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'solved'
)
subscription
.
requestStart
(
**
request_kw
)
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'diverged'
)
subscription
.
converge
()
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'solved'
)
subscription
.
requestDestroy
(
**
request_kw
)
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'diverged'
)
def
test_HostingSubscription_changePromiseInDivergedState
(
self
):
new_id
=
self
.
generateNewId
()
subscription
=
self
.
portal
.
hosting_subscription_module
.
newContent
(
portal_type
=
'Hosting Subscription'
,
title
=
"Subscription %s"
%
new_id
,
reference
=
"TESTSUB-%s"
%
new_id
,
)
subscription
.
validate
()
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'diverged'
)
request_kw
=
dict
(
software_release
=
'http://example.org'
,
software_type
=
'http://example.org'
,
instance_xml
=
self
.
generateSafeXml
(),
sla_xml
=
self
.
generateSafeXml
(),
shared
=
False
,
)
subscription
.
requestStop
(
**
request_kw
)
self
.
assertEqual
(
subscription
.
getCausalityState
(),
'diverged'
)
master/bt5/slapos_accounting/WorkflowTemplateItem/portal_workflow/slapos_accounting_interaction_workflow/interactions/HostingSubscription_changePromiseState.xml
0 → 100644
View file @
ac0b28fc
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"InteractionDefinition"
module=
"Products.ERP5.Interaction"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
activate_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<list>
<string>
Base_diverge
</string>
</list>
</value>
</item>
<item>
<key>
<string>
before_commit_script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
HostingSubscription_changePromiseState
</string>
</value>
</item>
<item>
<key>
<string>
method_id
</string>
</key>
<value>
<list>
<string>
requestStart
</string>
<string>
requestStop
</string>
<string>
requestDestroy
</string>
</list>
</value>
</item>
<item>
<key>
<string>
once_per_transaction
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
script_name
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/bt/revision
View file @
ac0b28fc
66
\ No newline at end of file
67
\ No newline at end of file
master/bt5/slapos_accounting/bt/template_portal_type_workflow_chain_list
View file @
ac0b28fc
Hosting Subscription | slapos_accounting_interaction_workflow
Hosting Subscription | slapos_api_invoicing_workflow
Sale Packing List | slapos_accounting_interaction_workflow
Slave Instance | slapos_accounting_interaction_workflow
Slave Instance | slapos_api_invoicing_workflow
...
...
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