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
Merge requests
!139
Feature/add validation workflows
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feature/add validation workflows
feature/add-validation-workflows
into
develop
Overview
5
Commits
55
Pipelines
24
Changes
3
Merged
Karel van Klink
requested to merge
feature/add-validation-workflows
into
develop
1 year ago
Overview
5
Commits
55
Pipelines
24
Changes
3
Expand
Fix the product_validation task
Add Router verification workflow
Add IP Trunk verification workflow
Update documentation
Add
modify_note
workflow to all products
Update translations
Note: The router creation workflow now fails if IPAM is incorrectly configured, with the reasoning that the step can be retried after amending the problem. This can be reverted.
0
0
Merge request reports
Viewing commit
be7d176d
Prev
Next
Show latest version
3 files
+
78
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
be7d176d
add unit test for router validation workflow
· be7d176d
Karel van Klink
authored
1 year ago
gso/workflows/router/validate_router.py
+
14
−
1
Options
@@ -3,14 +3,15 @@
import
json
from
orchestrator.targets
import
Target
from
orchestrator.utils.errors
import
ProcessFailureError
from
orchestrator.utils.json
import
json_dumps
from
orchestrator.workflow
import
StepList
,
done
,
init
,
step
,
workflow
from
orchestrator.workflows.steps
import
resync
,
store_process_subscription
,
unsync
from
orchestrator.workflows.utils
import
wrap_modify_initial_input_form
from
gso.products.product_types.router
import
Router
from
gso.services
import
infoblox
from
gso.services.provisioning_proxy
import
execute_playbook
,
pp_interaction
from
gso.workflows.router.create_router
import
verify_ipam_loopback
@step
(
"
Validate router configuration
"
)
@@ -26,6 +27,18 @@ def validate_router_config(subscription: Router, callback_route: str) -> None:
)
@step
(
"
Verify IPAM resources for loopback interface
"
)
def
verify_ipam_loopback
(
subscription
:
Router
)
->
None
:
"""
Validate the :term:`IPAM` resources for the loopback interface.
Raises an :class:`orchestrator.utils.errors.ProcessFailureError` if IPAM is configured incorrectly.
"""
host_record
=
infoblox
.
find_host_by_fqdn
(
f
"
lo0.
{
subscription
.
router
.
router_fqdn
}
"
)
if
not
host_record
or
str
(
subscription
.
subscription_id
)
not
in
host_record
.
comment
:
msg
=
"
Loopback record is incorrectly configured in IPAM, please investigate this manually!
"
raise
ProcessFailureError
(
msg
)
@workflow
(
"
Validate router configuration
"
,
target
=
Target
.
SYSTEM
,
Loading