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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
df6973d2
Commit
df6973d2
authored
Oct 04, 2023
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: drop notify and requestSupport transitions
They have been replaced by python script and alarms
parent
8479953d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
391 deletions
+0
-391
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_notify.py
...ow/person_slap_interface_workflow/script_Person_notify.py
+0
-54
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_notify.xml
...w/person_slap_interface_workflow/script_Person_notify.xml
+0
-76
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestSupportRequest.py
...interface_workflow/script_Person_requestSupportRequest.py
+0
-47
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestSupportRequest.xml
...nterface_workflow/script_Person_requestSupportRequest.xml
+0
-76
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/state_open_order_created.xml
...rson_slap_interface_workflow/state_open_order_created.xml
+0
-2
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/transition_notify.xml
...flow/person_slap_interface_workflow/transition_notify.xml
+0
-68
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/transition_request_support.xml
...on_slap_interface_workflow/transition_request_support.xml
+0
-68
No files found.
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_notify.py
deleted
100644 → 0
View file @
8479953d
person
=
state_change
[
'object'
]
portal
=
person
.
getPortalObject
()
# Get required arguments
kwargs
=
state_change
.
kwargs
# Required args
# Raise TypeError if all parameters are not provided
try
:
support_request_title
=
kwargs
[
'support_request_title'
]
description
=
kwargs
[
'support_request_description'
]
# Aggregate can be None, so it isn't included on the kwargs
aggregate
=
kwargs
[
"aggregate"
]
except
KeyError
:
raise
TypeError
,
"Person_requestSupportRequest takes exactly 3 arguments"
aggregate_value
=
portal
.
restrictedTraverse
(
aggregate
)
support_request_in_progress
=
aggregate_value
.
Base_getSupportRequestInProgress
(
title
=
support_request_title
)
if
support_request_in_progress
is
not
None
:
context
.
REQUEST
.
set
(
"support_request_relative_url"
,
support_request_in_progress
.
getRelativeUrl
())
context
.
REQUEST
.
set
(
"support_request_in_progress"
,
support_request_in_progress
.
getRelativeUrl
())
return
support_request_in_progress
=
context
.
REQUEST
.
get
(
"support_request_in_progress"
,
None
)
if
support_request_in_progress
is
not
None
:
support_request
=
portal
.
restrictedTraverse
(
support_request_in_progress
,
None
)
if
support_request
and
support_request
.
getTitle
()
==
support_request_title
and
\
support_request
.
getCausalityUid
()
==
aggregate_value
.
getUid
():
context
.
REQUEST
.
set
(
"support_request_relative_url"
,
support_request_in_progress
)
return
# Ensure resoure is Monitoring
resource
=
portal
.
service_module
.
\
slapos_crm_monitoring
.
getRelativeUrl
()
support_request
=
portal
.
support_request_module
.
newContent
(
portal_type
=
"Support Request"
,
title
=
support_request_title
,
description
=
description
,
start_date
=
DateTime
(),
destination_decision
=
person
.
getRelativeUrl
(),
causality_value
=
aggregate_value
,
resource
=
resource
)
support_request
.
validate
()
context
.
REQUEST
.
set
(
"support_request_relative_url"
,
support_request
.
getRelativeUrl
())
context
.
REQUEST
.
set
(
"support_request_in_progress"
,
support_request
.
getRelativeUrl
())
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_notify.xml
deleted
100644 → 0
View file @
8479953d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_Person_notify
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Person_notify
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestSupportRequest.py
deleted
100644 → 0
View file @
8479953d
person
=
state_change
[
'object'
]
portal
=
person
.
getPortalObject
()
# Get required arguments
kwargs
=
state_change
.
kwargs
# Required args
# Raise TypeError if all parameters are not provided
try
:
support_request_title
=
kwargs
[
'support_request_title'
]
resource
=
kwargs
[
'support_request_resource'
]
description
=
kwargs
[
'support_request_description'
]
project_reference
=
kwargs
[
'project_reference'
]
# Aggregate can be None, so it isn't included on the kwargs
aggregate
=
kwargs
.
get
(
"support_request_aggregate"
,
None
)
except
KeyError
:
raise
TypeError
,
"Person_requestSupportRequest takes exactly 5 arguments"
tag
=
"%s_%s_SupportRequestInProgress"
%
(
person
.
getUid
(),
support_request_title
)
if
(
portal
.
portal_activities
.
countMessageWithTag
(
tag
)
>
0
):
# The software instance is already under creation but can not be fetched from catalog
# As it is not possible to fetch informations, it is better to raise an error
raise
NotImplementedError
(
tag
)
# Ensure project is correctly set
project_list
=
portal
.
portal_catalog
.
portal_catalog
(
portal_type
=
'Project'
,
reference
=
project_reference
,
validation_state
=
'validated'
,
limit
=
2
)
if
len
(
project_list
)
!=
1
:
raise
NotImplementedError
(
"%i projects '%s'"
%
(
len
(
project_list
),
project_reference
))
support_request_portal_type
=
"Support Request"
module
=
portal
.
getDefaultModule
(
portal_type
=
support_request_portal_type
)
support_request
=
module
.
newContent
(
portal_type
=
support_request_portal_type
,
title
=
support_request_title
,
description
=
description
,
resource
=
resource
,
destination_decision_value
=
person
,
destination_project_value
=
project_list
[
0
],
causality
=
aggregate
,
specialise
=
"sale_trade_condition_module/slapos_ticket_trade_condition"
,
activate_kw
=
{
'tag'
:
tag
}
)
context
.
REQUEST
.
set
(
"support_request_relative_url"
,
support_request
.
getRelativeUrl
())
support_request
.
approveRegistration
()
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestSupportRequest.xml
deleted
100644 → 0
View file @
8479953d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_Person_requestSupportRequest
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Person_requestSupportRequest
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/state_open_order_created.xml
View file @
df6973d2
...
...
@@ -17,11 +17,9 @@
<value>
<tuple>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_draft
</string>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_notify
</string>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_request_compute_node
</string>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_request_network
</string>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_request_software_instance
</string>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_request_support
</string>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_request_token
</string>
</tuple>
</value>
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/transition_notify.xml
deleted
100644 → 0
View file @
8479953d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Transition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
action_name
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/workflow
</string>
<string>
before_script/portal_workflow/person_slap_interface_workflow/script_Person_checkConsistency
</string>
<string>
after_script/portal_workflow/person_slap_interface_workflow/script_Person_notify
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
guard_permission
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
transition_notify
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Transition
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Notify
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/transition_request_support.xml
deleted
100644 → 0
View file @
8479953d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Transition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
action_name
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/workflow
</string>
<string>
before_script/portal_workflow/person_slap_interface_workflow/script_Person_checkConsistency
</string>
<string>
after_script/portal_workflow/person_slap_interface_workflow/script_Person_requestSupportRequest
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
guard_permission
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
transition_request_support
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Transition
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Request Support
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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