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
8c4cc1e7
Commit
8c4cc1e7
authored
3 months ago
by
Shayan Hajipour
Browse files
Options
Downloads
Patches
Plain Diff
prefix added to lan value in ipv4-lan-prefixes
parent
e2ae478d
No related branches found
Branches containing commit
No related tags found
1 merge request
!283
Resolve "(CTTC) Implement L3 VPN SBI driver compatible with IETF L3 Service Model"
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py
+8
-8
8 additions, 8 deletions
..._handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py
with
8 additions
and
8 deletions
src/service/service/service_handlers/l3nm_ietfl3vpn/L3NM_IETFL3VPN_ServiceHandler.py
+
8
−
8
View file @
8c4cc1e7
...
...
@@ -54,8 +54,8 @@ class LANPrefixesDict(TypedDict):
class
Ipv4Info
(
TypedDict
):
src_
ip
:
str
dst_
ip
:
str
src_
lan
:
str
dst_
lan
:
str
src_port
:
str
dst_port
:
str
vlan
:
str
...
...
@@ -144,9 +144,9 @@ def extract_match_criterion_ipv4_info(
)
->
Ipv4Info
:
for
type_value
in
match_criterion
[
"
match-type
"
]:
if
type_value
[
"
type
"
]
==
"
ietf-network-slice-service:source-ip-prefix
"
:
src_
ip
=
type_value
[
"
value
"
][
0
]
.
split
(
"
/
"
)[
0
]
src_
lan
=
type_value
[
"
value
"
][
0
]
elif
type_value
[
"
type
"
]
==
"
ietf-network-slice-service:destination-ip-prefix
"
:
dst_
ip
=
type_value
[
"
value
"
][
0
]
.
split
(
"
/
"
)[
0
]
dst_
lan
=
type_value
[
"
value
"
][
0
]
elif
type_value
[
"
type
"
]
==
"
ietf-network-slice-service:source-tcp-port
"
:
src_port
=
type_value
[
"
value
"
][
0
]
elif
type_value
[
"
type
"
]
==
"
ietf-network-slice-service:destination-tcp-port
"
:
...
...
@@ -154,8 +154,8 @@ def extract_match_criterion_ipv4_info(
elif
type_value
[
"
type
"
]
==
"
ietf-network-slice-service:vlan
"
:
vlan
=
type_value
[
"
value
"
][
0
]
return
Ipv4Info
(
src_
ip
=
src_
ip
,
dst_
ip
=
dst_
ip
,
src_
lan
=
src_
lan
,
dst_
lan
=
dst_
lan
,
src_port
=
src_port
,
dst_port
=
dst_port
,
vlan
=
vlan
,
...
...
@@ -313,13 +313,13 @@ class L3NM_IETFL3VPN_ServiceHandler(_ServiceHandler):
)
src_ipv4_lan_prefixes
=
[
LANPrefixesDict
(
lan
=
src_match_criterion_ipv4_info
[
"
dst_
ip
"
],
lan
=
src_match_criterion_ipv4_info
[
"
dst_
lan
"
],
lan_tag
=
src_match_criterion_ipv4_info
[
"
vlan
"
],
)
]
dst_ipv4_lan_prefixes
=
[
LANPrefixesDict
(
lan
=
dst_match_criterion_ipv4_info
[
"
dst_
ip
"
],
lan
=
dst_match_criterion_ipv4_info
[
"
dst_
lan
"
],
lan_tag
=
dst_match_criterion_ipv4_info
[
"
vlan
"
],
)
]
...
...
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