From b2f174ca2e098ec318f606ad0b2a2e849765f4ce Mon Sep 17 00:00:00 2001 From: "@abbedsedk" Date: Fri, 22 Oct 2021 13:27:32 +0200 Subject: [PATCH] as defined in RFC 8664, Rename SR-ERO suboject from sid-type to nai-type https://git.opendaylight.org/gerrit/gitweb?p=bgpcep.git;a=commit;h=5b4952979cb5107a3333027849fec04254385641 this is starting ODL Aluminium 13.0 https://git.opendaylight.org/gerrit/c/bgpcep/+/91507 Update to RFC 8664 (PCEP Segment Routing) As per RFC 8664, this commit introduces following changes: - Add Flags N & X to SR PCE Capability - Add Ipv6 Local Nai Type and rename SID Type to NAI Type (NT) in odl-pcep-segment-routing-yang - Change IANA type (=36) for SR-ERO and SR-RRO to be the default value in pcep-segment-routing-app-config.yang instead of Legacy Type values - Update yang model revision - Turn IANA Type as the defaut for Segement Routing parser registration - Mark deprecated all IANA Type configuration (this will be removed in next release after Aluminium) - Add extra verifications to AbstractSrSubobjectParser Java Class and support for Ipv6Local NAI - Update accordingly Segment Routing Junit Tests JIRA: BGPCEP-882 --- pathman_sr.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pathman_sr.py b/pathman_sr.py index 75afe45..acfd12e 100644 --- a/pathman_sr.py +++ b/pathman_sr.py @@ -53,6 +53,8 @@ 20161226, Niklas - ver 5.9h - Multi area/level fix for bgp-ls and sid bug. 20170202, Niklas - ver 5.9i - Refactored sid_list to sid_saves to avoid duplicate use 20171013, Niklas - ver 5.9j - Updated odl version lis and checks + 20212210, Abbed Sedkaoui - 5.9k - Rename odl module Stateful07 -> Stateful + 20212210, Abbed Sedkaoui - 5.9l - Rename SR-ERO suboject from sid-type to nai-type """ __author__ = 'niklas' @@ -225,7 +227,7 @@ ero_sr_xml = ''' false - ipv4-node-id + ipv4-node-id true {sid} {hop} @@ -804,11 +806,11 @@ def list_pcep_lsp(node_list, debug): for nexthop in route_obj: if 'ip-prefix' in nexthop.keys(): ip_hoplist.append(nexthop['ip-prefix']['ip-prefix']) - if 'odl-pcep-segment-routing:sid-type' in nexthop.keys(): - if nexthop['odl-pcep-segment-routing:sid-type'] == 'ipv4-node-id': + if 'odl-pcep-segment-routing:nai-type' in nexthop.keys(): + if nexthop['odl-pcep-segment-routing:nai-type'] == 'ipv4-node-id': ip_hoplist.append(nexthop['odl-pcep-segment-routing:ip-address']) sid_list.append(nexthop['odl-pcep-segment-routing:sid']) - elif nexthop['odl-pcep-segment-routing:sid-type'] == 'ipv4-adjacency': + elif nexthop['odl-pcep-segment-routing:nai-type'] == 'ipv4-adjacency': ip_hoplist.append(nexthop['odl-pcep-segment-routing:remote-ip-address']) sid_list.append(nexthop['odl-pcep-segment-routing:sid'])