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
9a324e47
Commit
9a324e47
authored
4 months ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Change create_layer_2_circuit to use the same sid for both side of L2Circuit.
parent
0c6ac0a6
No related branches found
No related tags found
1 merge request
!307
Feature/l2circuits
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/workflows/l2_circuit/create_layer_2_circuit.py
+10
-7
10 additions, 7 deletions
gso/workflows/l2_circuit/create_layer_2_circuit.py
with
10 additions
and
7 deletions
gso/workflows/l2_circuit/create_layer_2_circuit.py
+
10
−
7
View file @
9a324e47
...
...
@@ -42,12 +42,7 @@ def initial_input_generator(product_name: str) -> FormGenerator:
class
Layer2CircuitSideSelection
(
BaseModel
):
edge_port
:
active_edge_port_selector
(
partner_id
=
initial_user_input
.
partner
)
# type: ignore[valid-type]
divider
:
Divider
=
Field
(
None
,
exclude
=
True
)
geant_sid
:
str
is_tagged
:
bool
=
False
vlan_id
:
VLAN_ID
custom_firewall_filters
:
bool
=
False
class
Layer2CircuitServiceSidesPage
(
FormPage
):
model_config
=
ConfigDict
(
title
=
f
"
{
product_name
}
- Configure Edge Ports
"
)
...
...
@@ -69,6 +64,8 @@ def initial_input_generator(product_name: str) -> FormGenerator:
policer_divider
:
Divider
=
Field
(
None
,
exclude
=
True
)
geant_sid
:
str
layer_2_circuit_side_a
:
Layer2CircuitSideSelection
side_divider
:
Divider
=
Field
(
None
,
exclude
=
True
)
layer_2_circuit_side_b
:
Layer2CircuitSideSelection
...
...
@@ -96,13 +93,19 @@ def initialize_subscription(
vlan_range_upper_bound
:
VLAN_ID
|
None
,
policer_enabled
:
bool
,
# noqa: FBT001
policer_bandwidth
:
BandwidthString
|
None
,
geant_sid
:
str
,
)
->
State
:
"""
Build a subscription object from all user input.
"""
layer_2_circuit_sides
=
[]
for
circuit_side_data
in
[
layer_2_circuit_side_a
,
layer_2_circuit_side_b
]:
edge_port_subscription
=
EdgePort
.
from_subscription
(
subscription_id
=
circuit_side_data
.
pop
(
"
edge_port
"
))
sbp
=
ServiceBindingPortInactive
.
new
(
uuid4
(),
edge_port
=
edge_port_subscription
.
edge_port
,
sbp_type
=
SBPType
.
L2
,
**
circuit_side_data
uuid4
(),
edge_port
=
EdgePort
.
from_subscription
(
subscription_id
=
circuit_side_data
[
"
edge_port
"
]).
edge_port
,
sbp_type
=
SBPType
.
L2
,
vlan_id
=
circuit_side_data
[
"
vlan_id
"
],
geant_sid
=
geant_sid
,
is_tagged
=
layer_2_circuit_type
==
Layer2CircuitType
.
TAGGED
,
custom_firewall_filters
=
False
,
)
layer2_circuit_side
=
Layer2CircuitSideBlockInactive
.
new
(
uuid4
(),
sbp
=
sbp
)
layer_2_circuit_sides
.
append
(
layer2_circuit_side
)
...
...
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