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
60efd98b
Verified
Commit
60efd98b
authored
8 months ago
by
Neda Moeini
Committed by
Karel van Klink
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix the issue with BFDSettings in GEANT IP creation.
parent
dd033080
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!298
Add BFD configuration to Service binding ports
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/workflows/nren_l3_core_service/create_nren_l3_core_service.py
+17
-15
17 additions, 15 deletions
...flows/nren_l3_core_service/create_nren_l3_core_service.py
with
17 additions
and
15 deletions
gso/workflows/nren_l3_core_service/create_nren_l3_core_service.py
+
17
−
15
View file @
60efd98b
...
@@ -13,7 +13,7 @@ from orchestrator.workflows.utils import wrap_create_initial_input_form
...
@@ -13,7 +13,7 @@ from orchestrator.workflows.utils import wrap_create_initial_input_form
from
pydantic
import
BaseModel
,
ConfigDict
,
Field
,
computed_field
from
pydantic
import
BaseModel
,
ConfigDict
,
Field
,
computed_field
from
pydantic_forms.validators
import
Divider
from
pydantic_forms.validators
import
Divider
from
gso.products.product_blocks.bgp_session
import
BGPSession
,
IPFamily
from
gso.products.product_blocks.bgp_session
import
BFDSettings
,
BGPSession
,
IPFamily
from
gso.products.product_blocks.nren_l3_core_service
import
NRENAccessPortInactive
from
gso.products.product_blocks.nren_l3_core_service
import
NRENAccessPortInactive
from
gso.products.product_blocks.service_binding_port
import
ServiceBindingPortInactive
from
gso.products.product_blocks.service_binding_port
import
ServiceBindingPortInactive
from
gso.products.product_types.edge_port
import
EdgePort
from
gso.products.product_types.edge_port
import
EdgePort
...
@@ -61,7 +61,7 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
...
@@ -61,7 +61,7 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
bfd_multiplier
:
int
|
None
=
None
bfd_multiplier
:
int
|
None
=
None
class
BaseBGPPeer
(
BaseModel
):
class
BaseBGPPeer
(
BaseModel
):
bfd_settings
:
BFDSettingsForm
bfd_settings
:
BFDSettingsForm
=
BFDSettingsForm
(
bfd_enabled
=
False
)
has_custom_policies
:
bool
=
False
has_custom_policies
:
bool
=
False
authentication_key
:
str
|
None
=
None
authentication_key
:
str
|
None
=
None
multipath_enabled
:
bool
=
False
multipath_enabled
:
bool
=
False
...
@@ -97,8 +97,8 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
...
@@ -97,8 +97,8 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
geant_sid
:
str
geant_sid
:
str
is_tagged
:
bool
=
False
is_tagged
:
bool
=
False
v4_bfd_settings
:
BFDSettingsForm
v4_bfd_settings
:
BFDSettingsForm
=
BFDSettingsForm
(
bfd_enabled
=
False
)
v6_bfd_settings
:
BFDSettingsForm
v6_bfd_settings
:
BFDSettingsForm
=
BFDSettingsForm
(
bfd_enabled
=
False
)
vlan_id
:
VLAN_ID
vlan_id
:
VLAN_ID
ipv4_address
:
IPv4AddressType
ipv4_address
:
IPv4AddressType
ipv4_mask
:
IPV4Netmask
ipv4_mask
:
IPV4Netmask
...
@@ -140,11 +140,19 @@ def initialize_subscription(
...
@@ -140,11 +140,19 @@ def initialize_subscription(
edge_port_fqdn_list
=
[]
edge_port_fqdn_list
=
[]
edge_port_subscription
=
EdgePort
.
from_subscription
(
edge_port
[
"
edge_port
"
])
edge_port_subscription
=
EdgePort
.
from_subscription
(
edge_port
[
"
edge_port
"
])
sbp_bgp_session_list
=
[
sbp_bgp_session_list
=
[
BGPSession
.
new
(
subscription_id
=
uuid4
(),
**
session
,
rtbh_enabled
=
True
,
is_multi_hop
=
True
)
BGPSession
.
new
(
subscription_id
=
uuid4
(),
bfd_settings
=
BFDSettings
.
new
(
subscription_id
=
uuid4
(),
**
(
session
.
pop
(
"
bfd_settings
"
))),
**
session
,
rtbh_enabled
=
True
,
is_multi_hop
=
True
,
)
for
session
in
binding_port_input
[
"
bgp_peers
"
]
for
session
in
binding_port_input
[
"
bgp_peers
"
]
]
]
service_binding_port
=
ServiceBindingPortInactive
.
new
(
service_binding_port
=
ServiceBindingPortInactive
.
new
(
subscription_id
=
uuid4
(),
subscription_id
=
uuid4
(),
v4_bfd_settings
=
BFDSettings
.
new
(
subscription_id
=
uuid4
(),
**
(
binding_port_input
.
pop
(
"
v4_bfd_settings
"
))),
v6_bfd_settings
=
BFDSettings
.
new
(
subscription_id
=
uuid4
(),
**
(
binding_port_input
.
pop
(
"
v6_bfd_settings
"
))),
**
binding_port_input
,
**
binding_port_input
,
bgp_session_list
=
sbp_bgp_session_list
,
bgp_session_list
=
sbp_bgp_session_list
,
sbp_type
=
SBPType
.
L3
,
sbp_type
=
SBPType
.
L3
,
...
@@ -161,15 +169,12 @@ def initialize_subscription(
...
@@ -161,15 +169,12 @@ def initialize_subscription(
subscription
.
description
=
f
"
{
product_name
}
service
"
subscription
.
description
=
f
"
{
product_name
}
service
"
partner_name
=
get_partner_by_id
(
subscription
.
customer_id
).
name
partner_name
=
get_partner_by_id
(
subscription
.
customer_id
).
name
return
{
"
subscription
"
:
subscription
,
"
edge_port_fqdn_list
"
:
edge_port_fqdn_list
,
"
partner_name
"
:
partner_name
}
return
{
"
subscription
"
:
subscription
,
"
edge_port_fqdn_list
"
:
edge_port_fqdn_list
,
"
partner_name
"
:
partner_name
}
@step
(
"
[DRY RUN] Deploy service binding port
"
)
@step
(
"
[DRY RUN] Deploy service binding port
"
)
def
provision_sbp_dry
(
def
provision_sbp_dry
(
subscription
:
dict
[
str
,
Any
],
process_id
:
UUIDstr
,
tt_number
:
str
,
edge_port_fqdn_list
:
list
[
str
],
subscription
:
dict
[
str
,
Any
],
process_id
:
UUIDstr
,
tt_number
:
str
,
edge_port_fqdn_list
:
list
[
str
],
partner_name
:
str
partner_name
:
str
)
->
LSOState
:
)
->
LSOState
:
"""
Perform a dry run of deploying Service Binding Ports.
"""
"""
Perform a dry run of deploying Service Binding Ports.
"""
extra_vars
=
{
extra_vars
=
{
...
@@ -191,8 +196,7 @@ def provision_sbp_dry(
...
@@ -191,8 +196,7 @@ def provision_sbp_dry(
@step
(
"
[FOR REAL] Deploy service binding port
"
)
@step
(
"
[FOR REAL] Deploy service binding port
"
)
def
provision_sbp_real
(
def
provision_sbp_real
(
subscription
:
dict
[
str
,
Any
],
process_id
:
UUIDstr
,
tt_number
:
str
,
edge_port_fqdn_list
:
list
[
str
],
subscription
:
dict
[
str
,
Any
],
process_id
:
UUIDstr
,
tt_number
:
str
,
edge_port_fqdn_list
:
list
[
str
],
partner_name
:
str
partner_name
:
str
)
->
LSOState
:
)
->
LSOState
:
"""
Deploy Service Binding Ports.
"""
"""
Deploy Service Binding Ports.
"""
extra_vars
=
{
extra_vars
=
{
...
@@ -226,8 +230,7 @@ def check_sbp_functionality(subscription: dict[str, Any], edge_port_fqdn_list: l
...
@@ -226,8 +230,7 @@ def check_sbp_functionality(subscription: dict[str, Any], edge_port_fqdn_list: l
@step
(
"
[DRY RUN] Deploy BGP peers
"
)
@step
(
"
[DRY RUN] Deploy BGP peers
"
)
def
deploy_bgp_peers_dry
(
def
deploy_bgp_peers_dry
(
subscription
:
dict
[
str
,
Any
],
edge_port_fqdn_list
:
list
[
str
],
tt_number
:
str
,
process_id
:
UUIDstr
,
subscription
:
dict
[
str
,
Any
],
edge_port_fqdn_list
:
list
[
str
],
tt_number
:
str
,
process_id
:
UUIDstr
,
partner_name
:
str
partner_name
:
str
)
->
LSOState
:
)
->
LSOState
:
"""
Perform a dry run of deploying :term:`BGP` peers.
"""
"""
Perform a dry run of deploying :term:`BGP` peers.
"""
extra_vars
=
{
extra_vars
=
{
...
@@ -249,8 +252,7 @@ def deploy_bgp_peers_dry(
...
@@ -249,8 +252,7 @@ def deploy_bgp_peers_dry(
@step
(
"
[FOR REAL] Deploy BGP peers
"
)
@step
(
"
[FOR REAL] Deploy BGP peers
"
)
def
deploy_bgp_peers_real
(
def
deploy_bgp_peers_real
(
subscription
:
dict
[
str
,
Any
],
edge_port_fqdn_list
:
list
[
str
],
tt_number
:
str
,
process_id
:
UUIDstr
,
subscription
:
dict
[
str
,
Any
],
edge_port_fqdn_list
:
list
[
str
],
tt_number
:
str
,
process_id
:
UUIDstr
,
partner_name
:
str
partner_name
:
str
)
->
LSOState
:
)
->
LSOState
:
"""
Deploy :term:`BGP` peers.
"""
"""
Deploy :term:`BGP` peers.
"""
extra_vars
=
{
extra_vars
=
{
...
...
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