From af17d8017bc44dd6246e4356ceaa4a2ea6b3e025 Mon Sep 17 00:00:00 2001 From: "@abbedsedk" Date: Fri, 22 Oct 2021 13:09:57 +0200 Subject: [PATCH] odl-pcep-ietf-stateful07 updated to odl-pcep-ietf-stateful as of Opendaylight Aluminium 13.0 new module replacing it module https://mvnrepository.com/artifact/org.opendaylight.bgpcep/pcep-ietf-stateful07 replaced by https://mvnrepository.com/artifact/org.opendaylight.bgpcep/pcep-ietf-stateful https://git.opendaylight.org/gerrit/c/bgpcep/+/91372 Pcep Stateful & Initiated renaming This is the first part of compliancy to RFC8231 (Stateful) & RFC8281 (Initiated). It removes mention to old draft in various package name, class name, yange model name ... as follow: - Rename Stateful07 -> Stateful - Rename Initiated00 -> Initiated - CrabbeInitiated -> Initiated JIRA: BGPCEP-882 --- pathman_sr.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pathman_sr.py b/pathman_sr.py index 9d43bbb..68eefde 100644 --- a/pathman_sr.py +++ b/pathman_sr.py @@ -53,6 +53,7 @@ 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 """ __author__ = 'niklas' @@ -791,10 +792,10 @@ def list_pcep_lsp(node_list, debug): name = path['name'] ip_hoplist = [] sid_list = [] - if 'odl-pcep-ietf-stateful07:lsp' in path['path'][0].keys(): - if 'operational' in path['path'][0]['odl-pcep-ietf-stateful07:lsp'].keys(): - oper = path['path'][0]['odl-pcep-ietf-stateful07:lsp']['operational'] - # if path['path'][0]['odl-pcep-ietf-stateful07:lsp']['operational'] == 'up': + if 'odl-pcep-ietf-stateful:lsp' in path['path'][0].keys(): + if 'operational' in path['path'][0]['odl-pcep-ietf-stateful:lsp'].keys(): + oper = path['path'][0]['odl-pcep-ietf-stateful:lsp']['operational'] + # if path['path'][0]['odl-pcep-ietf-stateful:lsp']['operational'] == 'up': if oper == 'up' or oper == 'active': if 'rro' in path['path'][0].keys(): route_obj = path['path'][0]['rro']['subobject'] @@ -982,7 +983,7 @@ def get_pcep_type(debug): for node in my_pcep['topology'][0]['node']: loopback = node['network-topology-pcep:path-computation-client']['ip-address'] pcc = node['node-id'] - if 'odl-pcep-ietf-stateful07:stateful' in node['network-topology-pcep:path-computation-client']['stateful-tlv'].keys(): + if 'odl-pcep-ietf-stateful:stateful' in node['network-topology-pcep:path-computation-client']['stateful-tlv'].keys(): pcep_type = '07' else: pcep_type = '02'