From 105101c1bc085c2694d8b6c2402a8f9756b74d34 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Sat, 5 Oct 2024 13:28:26 +0100 Subject: [PATCH] add str representation --- src/exabgp/bgp/message/open/capability/refresh.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/exabgp/bgp/message/open/capability/refresh.py b/src/exabgp/bgp/message/open/capability/refresh.py index 78b3c84c8..51d5cbf87 100644 --- a/src/exabgp/bgp/message/open/capability/refresh.py +++ b/src/exabgp/bgp/message/open/capability/refresh.py @@ -28,6 +28,15 @@ def json(refresh): return 'enhanced' return 'unknown' + def __str__ (self): + if self == REFRESH.ABSENT: + return 'absent' + if self == REFRESH.NORMAL: + return 'normal' + if self == REFRESH.ENHANCED: + return 'enhanced' + return 'unknown' + @Capability.register() @Capability.register(Capability.CODE.ROUTE_REFRESH_CISCO)