Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
beed6610
Verified
Commit
beed6610
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Add optional customisation to LSO interaction result page
parent
b9316222
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!175
lso result step title is now always the name of the provisioning step
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/services/lso_client.py
+14
-3
14 additions, 3 deletions
gso/services/lso_client.py
with
14 additions
and
3 deletions
gso/services/lso_client.py
+
14
−
3
View file @
beed6610
...
...
@@ -15,7 +15,7 @@ from orchestrator.utils.errors import ProcessFailureError
from
orchestrator.workflow
import
Step
,
StepList
,
begin
,
callback_step
,
inputstep
from
pydantic_forms.core
import
FormPage
,
ReadOnlyField
from
pydantic_forms.types
import
FormGenerator
from
pydantic_forms.validators
import
LongText
from
pydantic_forms.validators
import
Label
,
LongText
from
gso
import
settings
...
...
@@ -124,15 +124,22 @@ def _show_results(state: State) -> FormGenerator:
if
"
callback_result
"
not
in
state
:
return
state
if
"
lso_result_title
"
in
state
:
result_title
=
state
[
"
lso_result_title
"
]
else
:
result_title
=
f
"
Execution for
{
state
[
'
subscription
'
][
'
product
'
][
'
name
'
]
}
completed.
"
class
ConfirmRunPage
(
FormPage
):
class
Config
:
title
:
str
=
f
"
Execution for
{
state
[
'
subscription
'
][
'
product
'
][
'
name
'
]
}
completed.
"
title
:
str
=
result_title
if
"
lso_result_extra_label
"
in
state
:
extra_label
:
Label
=
state
[
"
lso_result_extra_label
"
]
run_status
:
str
=
ReadOnlyField
(
state
[
"
callback_result
"
][
"
status
"
])
run_results
:
LongText
=
ReadOnlyField
(
json
.
dumps
(
state
[
"
callback_result
"
],
indent
=
4
))
yield
ConfirmRunPage
state
.
pop
(
"
run_results
"
)
[
state
.
pop
(
key
)
for
key
in
[
"
run_results
"
,
"
lso_result_title
"
,
"
lso_result_extra_label
"
]]
return
state
...
...
@@ -143,6 +150,10 @@ def lso_interaction(provisioning_step: Step) -> StepList:
to provision service subscriptions. If the playbook fails, this step will also fail, allowing for the user to retry
provisioning from the UI.
Optionally, the keys ``lso_result_title`` and ``lso_result_extra_label`` can be added to the state before running
this interaction. They will be used to customise the input step that shows the outcome of the :term:`LSO`
interaction.
:param provisioning_step: A workflow step that performs an operation remotely using the provisioning proxy.
:type provisioning_step: :class:`Step`
:return: A list of steps that is executed as part of the workflow.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment