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
b74b3279
Verified
Commit
b74b3279
authored
7 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Make router creation workflow use helper method
parent
82f445fa
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!286
Add Edge Port, GÉANT IP and IAS products
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/workflows/router/create_router.py
+4
-13
4 additions, 13 deletions
gso/workflows/router/create_router.py
with
4 additions
and
13 deletions
gso/workflows/router/create_router.py
+
4
−
13
View file @
b74b3279
...
...
@@ -4,7 +4,7 @@ from typing import Self
from
orchestrator.config.assignee
import
Assignee
from
orchestrator.forms
import
FormPage
from
orchestrator.forms.validators
import
Choice
,
Label
from
orchestrator.forms.validators
import
Label
from
orchestrator.targets
import
Target
from
orchestrator.types
import
FormGenerator
,
State
,
SubscriptionLifecycle
,
UUIDstr
from
orchestrator.utils.errors
import
ProcessFailureError
...
...
@@ -17,13 +17,13 @@ from pydantic_forms.validators import ReadOnlyField
from
gso.products.product_blocks.router
import
RouterRole
from
gso.products.product_types.router
import
RouterInactive
,
RouterProvisioning
from
gso.products.product_types.site
import
Site
from
gso.services
import
infoblox
,
subscriptions
from
gso.services
import
infoblox
from
gso.services.lso_client
import
lso_interaction
from
gso.services.netbox_client
import
NetboxClient
from
gso.services.partners
import
get_partner_by_name
from
gso.services.sharepoint
import
SharePointClient
from
gso.settings
import
load_oss_params
from
gso.utils.helpers
import
generate_fqdn
,
iso_from_ipv4
from
gso.utils.helpers
import
active_site_selector
,
generate_fqdn
,
iso_from_ipv4
from
gso.utils.shared_enums
import
Vendor
from
gso.utils.types.ip_address
import
PortNumber
from
gso.utils.types.tt_number
import
TTNumber
...
...
@@ -35,15 +35,6 @@ from gso.utils.workflow_steps import (
)
def
_site_selector
()
->
Choice
:
site_subscriptions
=
{}
for
site
in
subscriptions
.
get_active_site_subscriptions
(
includes
=
[
"
subscription_id
"
,
"
description
"
]):
site_subscriptions
[
str
(
site
[
"
subscription_id
"
])]
=
site
[
"
description
"
]
# noinspection PyTypeChecker
return
Choice
(
"
Select a site
"
,
zip
(
site_subscriptions
.
keys
(),
site_subscriptions
.
items
(),
strict
=
True
))
# type: ignore[arg-type]
def
initial_input_form_generator
(
product_name
:
str
)
->
FormGenerator
:
"""
Gather information about the new router from the operator.
"""
...
...
@@ -53,7 +44,7 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
tt_number
:
TTNumber
partner
:
ReadOnlyField
(
"
GEANT
"
,
default_type
=
str
)
# type: ignore[valid-type]
vendor
:
Vendor
router_site
:
_site_selector
()
# type: ignore[valid-type]
router_site
:
active
_site_selector
()
hostname
:
str
ts_port
:
PortNumber
router_role
:
RouterRole
...
...
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