Skip to content

Commit

Permalink
add str representation
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mangin committed Oct 5, 2024
1 parent e6ebb17 commit 105101c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/exabgp/bgp/message/open/capability/refresh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 105101c

Please sign in to comment.