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
83cec5b9
Commit
83cec5b9
authored
6 months ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Improve range_field function in L2Circuits creation WF
parent
18b49060
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
+3
-3
3 additions, 3 deletions
gso/workflows/l2_circuit/create_layer_2_circuit.py
with
3 additions
and
3 deletions
gso/workflows/l2_circuit/create_layer_2_circuit.py
+
3
−
3
View file @
83cec5b9
...
...
@@ -48,7 +48,7 @@ def initial_input_generator(product_name: str) -> FormGenerator:
)
vlan_id
:
VLAN_ID
def
vlan_range_field
(
*
,
is_tagged
:
bool
)
->
Any
:
def
_
vlan_range_field
(
*
,
is_tagged
:
bool
)
->
VLAN_ID
|
ReadOnlyField
:
"""
Return the appropriate field type based on whether the circuit is tagged.
"""
return
VLAN_ID
if
is_tagged
else
ReadOnlyField
(
None
,
default_type
=
int
)
...
...
@@ -56,10 +56,10 @@ def initial_input_generator(product_name: str) -> FormGenerator:
model_config
=
ConfigDict
(
title
=
f
"
{
product_name
}
- Configure Edge Ports
"
)
vlan_range_label
:
Label
=
Field
(
"
Please set a VLAN range, bounds including.
"
,
exclude
=
True
)
vlan_range_lower_bound
:
vlan_range_field
(
vlan_range_lower_bound
:
_
vlan_range_field
(
is_tagged
=
initial_user_input
.
layer_2_circuit_type
==
Layer2CircuitType
.
TAGGED
)
vlan_range_upper_bound
:
vlan_range_field
(
vlan_range_upper_bound
:
_
vlan_range_field
(
is_tagged
=
initial_user_input
.
layer_2_circuit_type
==
Layer2CircuitType
.
TAGGED
)
vlan_divider
:
Divider
=
Field
(
None
,
exclude
=
True
)
...
...
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