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
4c2f7b7b
Commit
4c2f7b7b
authored
3 months ago
by
Mohammad Torkashvand
Browse files
Options
Downloads
Patches
Plain Diff
add anonymous_indifferent_lso_interaction step
parent
456a7004
No related branches found
Branches containing commit
Tags
2.27
Tags containing commit
1 merge request
!321
add anonymous_indifferent_lso_interaction step
Pipeline
#90768
passed
3 months ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/services/lso_client.py
+22
-0
22 additions, 0 deletions
gso/services/lso_client.py
gso/utils/workflow_steps.py
+15
-2
15 additions, 2 deletions
gso/utils/workflow_steps.py
with
37 additions
and
2 deletions
gso/services/lso_client.py
+
22
−
0
View file @
4c2f7b7b
...
...
@@ -267,3 +267,25 @@ def anonymous_lso_interaction(provisioning_step: Step, validation_step: Step = _
)
>>
_clean_state
)
def
anonymous_indifferent_lso_interaction
(
provisioning_step
:
Step
)
->
StepList
:
"""
Interact with the provisioning proxy :term:`LSO` without any user input.
Similar to the anonymous LSO interaction, but indifferent about the outcome of the Ansible playbook that is executed
Args:
provisioning_step: A workflow step to remotely provision a subscription.
"""
return
(
begin
>>
provisioning_step
>>
_inventory_is_not_empty
(
callback_step
(
name
=
"
Running Ansible playbook
"
,
action_step
=
_execute_playbook
,
validate_step
=
_ignore_results
,
)
)
>>
_clean_state
)
This diff is collapsed.
Click to expand it.
gso/utils/workflow_steps.py
+
15
−
2
View file @
4c2f7b7b
...
...
@@ -17,7 +17,7 @@ from pydantic_forms.validators import Label
from
gso.products.product_blocks.router
import
RouterRole
from
gso.products.product_types.iptrunk
import
Iptrunk
from
gso.services.kentik_client
import
KentikClient
,
NewKentikDevice
from
gso.services.lso_client
import
LSOState
,
indifferent_lso_interaction
from
gso.services.lso_client
import
LSOState
,
anonymous_indifferent_lso_interaction
,
indifferent_lso_interaction
from
gso.settings
import
load_oss_params
from
gso.utils.helpers
import
generate_inventory_for_routers
from
gso.utils.shared_enums
import
Vendor
...
...
@@ -416,6 +416,17 @@ def stop_moodi() -> StepList:
"""
Stop Moodi Telemetry monitoring on demand.
"""
host
=
load_oss_params
().
MOODI
.
host
@inputstep
(
"
Confirm stopping on-demand monitoring.
"
,
assignee
=
Assignee
(
"
SYSTEM
"
))
def
_confirm_stopping_moodi
(
state
:
State
)
->
FormGenerator
:
class
ConfirmStoppingPage
(
FormPage
):
model_config
=
ConfigDict
()
run_results
:
Label
=
"
Please confirm that you want to stop Moodi.
"
yield
ConfirmStoppingPage
return
state
@step
(
"
Stop Moodi
"
)
def
_stop_moodi
(
subscription
:
dict
[
str
,
Any
])
->
LSOState
:
return
{
...
...
@@ -424,7 +435,9 @@ def stop_moodi() -> StepList:
"
extra_vars
"
:
{
"
subscription
"
:
subscription
},
}
return
_is_moodi_enabled
(
indifferent_lso_interaction
(
_stop_moodi
))
return
_is_moodi_enabled
(
_confirm_stopping_moodi
)
>>
_is_moodi_enabled
(
anonymous_indifferent_lso_interaction
(
_stop_moodi
)
)
@step
(
"
Create Kentik device
"
)
...
...
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