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
e9bcc55c
Commit
e9bcc55c
authored
3 months ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
NBI component - IETF L3VPN:
- Reverting unneeded changes
parent
cacb2ad1
No related branches found
No related tags found
3 merge requests
!346
Draft: support for restconf protocol
,
!345
Draft: support ipinfusion devices via netconf
,
!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/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py
+3
-14
3 additions, 14 deletions
...bi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py
with
3 additions
and
14 deletions
src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py
+
3
−
14
View file @
e9bcc55c
...
...
@@ -15,7 +15,7 @@
import
logging
,
netaddr
from
typing
import
Dict
,
List
,
Optional
,
Tuple
from
common.Constants
import
DEFAULT_CONTEXT_NAME
from
common.proto.context_pb2
import
Service
,
ServiceStatusEnum
,
ServiceTypeEnum
,
Empty
from
common.proto.context_pb2
import
Service
,
ServiceStatusEnum
,
ServiceTypeEnum
from
common.tools.context_queries.Service
import
get_service_by_uuid
from
common.tools.grpc.ConfigRules
import
update_config_rule_custom
from
common.tools.grpc.Constraints
import
(
...
...
@@ -97,11 +97,8 @@ def update_service_endpoint(
endpoint_settings_key
=
ENDPOINT_SETTINGS_KEY
.
format
(
device_uuid
,
endpoint_uuid
)
field_updates
=
{}
if
vlan_tag
is
not
None
:
field_updates
[
'
vlan_tag
'
]
=
(
vlan_tag
,
True
)
# if ipv4_address is not None: field_updates['ip_address' ] = (ipv4_address, True)
# if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (neighbor_ipv4_address, True)
#! neighbor_ipv4_address and ipv4_address' field swapped to manage the PE. Fix it later
if
ipv4_address
is
not
None
:
field_updates
[
'
ip_address
'
]
=
(
neighbor_ipv4_address
,
True
)
if
neighbor_ipv4_address
is
not
None
:
field_updates
[
'
neighbor_address
'
]
=
(
ipv4_address
,
True
)
if
ipv4_address
is
not
None
:
field_updates
[
'
ip_address
'
]
=
(
ipv4_address
,
True
)
if
neighbor_ipv4_address
is
not
None
:
field_updates
[
'
neighbor_address
'
]
=
(
neighbor_ipv4_address
,
True
)
if
ipv4_prefix_length
is
not
None
:
field_updates
[
'
prefix_length
'
]
=
(
ipv4_prefix_length
,
True
)
update_config_rule_custom
(
config_rules
,
endpoint_settings_key
,
field_updates
)
...
...
@@ -116,8 +113,6 @@ def update_service_endpoint(
def
process_site_network_access
(
site_id
:
str
,
network_access
:
Dict
,
site_static_routing
:
Dict
[
Tuple
[
str
,
str
],
str
],
errors
:
List
[
Dict
]
)
->
None
:
# client = ContextClient()
# devices = client.ListDevices(Empty()).devices
endpoint_uuid
=
network_access
[
'
site-network-access-id
'
]
if
network_access
[
'
site-network-access-type
'
]
!=
'
ietf-l3vpn-svc:multipoint
'
:
...
...
@@ -125,12 +120,6 @@ def process_site_network_access(
raise
NotImplementedError
(
MSG
.
format
(
str
(
network_access
[
'
site-network-access-type
'
])))
device_uuid
=
network_access
[
'
device-reference
'
]
# location = network_access['location-reference']
# for device in devices:
# for cr in device.device_config.config_rules:
# if cr.WhichOneof('config_rule') != 'custom':
# continue
service_uuid
=
network_access
[
'
vpn-attachment
'
][
'
vpn-id
'
]
access_role
:
str
=
network_access
[
'
vpn-attachment
'
][
'
site-role
'
]
...
...
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