Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
TFS
controller
Commits
e6dba8b7
Commit
e6dba8b7
authored
1 year ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Service component - L2NM Emulated Service Handler:
- Improved parameter gathering
parent
b9287d37
No related branches found
No related tags found
2 merge requests
!142
Release TeraFlowSDN 2.1
,
!110
Partial fix OECC/PSC'22 test, InterDomain component, and other side improvements
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/service/service/service_handlers/l2nm_emulated/ConfigRules.py
+6
-3
6 additions, 3 deletions
...ice/service/service_handlers/l2nm_emulated/ConfigRules.py
with
6 additions
and
3 deletions
src/service/service/service_handlers/l2nm_emulated/ConfigRules.py
+
6
−
3
View file @
e6dba8b7
...
@@ -24,7 +24,7 @@ def setup_config_rules(
...
@@ -24,7 +24,7 @@ def setup_config_rules(
if
service_settings
is
None
:
return
[]
if
service_settings
is
None
:
return
[]
if
endpoint_settings
is
None
:
return
[]
if
endpoint_settings
is
None
:
return
[]
#
json_settings : Dict = service_settings.value
json_settings
:
Dict
=
service_settings
.
value
json_endpoint_settings
:
Dict
=
endpoint_settings
.
value
json_endpoint_settings
:
Dict
=
endpoint_settings
.
value
#mtu = json_settings.get('mtu', 1450 ) # 1512
#mtu = json_settings.get('mtu', 1450 ) # 1512
...
@@ -35,11 +35,14 @@ def setup_config_rules(
...
@@ -35,11 +35,14 @@ def setup_config_rules(
#router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10'
#router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10'
#route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801'
#route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801'
sub_interface_index
=
json_endpoint_settings
.
get
(
'
sub_interface_index
'
,
0
)
# 1
sub_interface_index
=
json_endpoint_settings
.
get
(
'
sub_interface_index
'
,
0
)
# 1
vlan_id
=
json_endpoint_settings
.
get
(
'
vlan_id
'
,
1
)
# 400
vlan_id
=
json_endpoint_settings
.
get
(
'
vlan_id
'
,
None
)
# 400
#address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1'
#address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1'
#address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30
#address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30
remote_router
=
json_endpoint_settings
.
get
(
'
remote_router
'
,
'
0.0.0.0
'
)
# '5.5.5.5'
remote_router
=
json_endpoint_settings
.
get
(
'
remote_router
'
,
'
0.0.0.0
'
)
# '5.5.5.5'
circuit_id
=
json_endpoint_settings
.
get
(
'
circuit_id
'
,
'
000
'
)
# '111'
circuit_id
=
json_endpoint_settings
.
get
(
'
circuit_id
'
,
None
)
# '111'
if
vlan_id
is
None
:
vlan_id
=
json_settings
.
get
(
'
vlan_id
'
,
1
)
if
circuit_id
is
None
:
circuit_id
=
json_settings
.
get
(
'
circuit_id
'
,
'
000
'
)
if_cirid_name
=
'
{:s}.{:s}
'
.
format
(
endpoint_name
,
str
(
circuit_id
))
if_cirid_name
=
'
{:s}.{:s}
'
.
format
(
endpoint_name
,
str
(
circuit_id
))
network_instance_name
=
'
ELAN-AC:{:s}
'
.
format
(
str
(
circuit_id
))
network_instance_name
=
'
ELAN-AC:{:s}
'
.
format
(
str
(
circuit_id
))
...
...
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