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
Jira
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
06e88d66
Commit
06e88d66
authored
1 year ago
by
Aleksandr Kurbatov
Browse files
Options
Downloads
Patches
Plain Diff
deploy_twamp: additional check step
An additional step for checking TWAMP status
parent
1f5d528e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!196
deploy_twamp: additional check step
Pipeline
#86180
failed
1 year ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/workflows/iptrunk/deploy_twamp.py
+20
-0
20 additions, 0 deletions
gso/workflows/iptrunk/deploy_twamp.py
test/workflows/iptrunk/test_deploy_twamp.py
+2
-2
2 additions, 2 deletions
test/workflows/iptrunk/test_deploy_twamp.py
with
22 additions
and
2 deletions
gso/workflows/iptrunk/deploy_twamp.py
+
20
−
0
View file @
06e88d66
...
...
@@ -77,6 +77,25 @@ def deploy_twamp_real(subscription: Iptrunk, process_id: UUIDstr, callback_route
return
{
"
subscription
"
:
subscription
}
@step
(
"
Check TWAMP status on both sides
"
)
def
check_twamp_status
(
subscription
:
Iptrunk
,
process_id
:
UUIDstr
,
callback_route
:
str
,
tt_number
:
str
)
->
State
:
"""
Check TWAMP session.
"""
extra_vars
=
{
"
subscription
"
:
json
.
loads
(
json_dumps
(
subscription
)),
"
process_id
"
:
process_id
,
"
verb
"
:
"
check_twamp
"
,
}
inventory
=
(
f
"
{
subscription
.
iptrunk
.
iptrunk_sides
[
0
].
iptrunk_side_node
.
router_fqdn
}
"
f
"
\n
{
subscription
.
iptrunk
.
iptrunk_sides
[
1
].
iptrunk_side_node
.
router_fqdn
}
"
)
execute_playbook
(
"
deploy_twamp.yaml
"
,
callback_route
,
inventory
,
extra_vars
)
return
{
"
subscription
"
:
subscription
}
@workflow
(
"
Deploy TWAMP
"
,
initial_input_form
=
wrap_modify_initial_input_form
(
_initial_input_form_generator
),
...
...
@@ -93,6 +112,7 @@ def deploy_twamp() -> StepList:
>>
unsync
>>
lso_interaction
(
deploy_twamp_dry
)
>>
lso_interaction
(
deploy_twamp_real
)
>>
lso_interaction
(
check_twamp_status
)
>>
resync
>>
done
)
This diff is collapsed.
Click to expand it.
test/workflows/iptrunk/test_deploy_twamp.py
+
2
−
2
View file @
06e88d66
...
...
@@ -25,7 +25,7 @@ def test_iptrunk_deploy_twamp_success(
initial_input_data
=
[{
"
subscription_id
"
:
product_id
},
{
"
tt_number
"
:
faker
.
tt_number
()}]
result
,
process_stat
,
step_log
=
run_workflow
(
"
deploy_twamp
"
,
initial_input_data
)
for
_
in
range
(
2
):
for
_
in
range
(
3
):
result
,
step_log
=
assert_lso_interaction_success
(
result
,
process_stat
,
step_log
)
assert_complete
(
result
)
...
...
@@ -35,4 +35,4 @@ def test_iptrunk_deploy_twamp_success(
subscription
=
Iptrunk
.
from_subscription
(
subscription_id
)
assert
subscription
.
status
==
"
active
"
assert
mock_execute_playbook
.
call_count
==
2
assert
mock_execute_playbook
.
call_count
==
3
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