Skip to content

Commit

Permalink
rename software-version to software
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mangin committed Jul 15, 2024
1 parent 832a8db commit 3678343
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion qa/decoding/bgp-open-sofware-version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
open
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00510104FFFD00B40A000002340206010400010001020641040000FFFD02224B201F4578614247502F6D61696E2D633261326561386562642D3230323430373135
{ "exabgp": "5.0.0", "time": 1721069327.773314, "host" : "MacBook-Pro-3.local", "pid" : 23259, "ppid" : 52865, "counter": 1, "type": "open", "neighbor": { "address": { "local": "127.0.0.1", "peer": "127.0.0.1" }, "asn": { "local": 65533, "peer": 65533 } , "direction": "in", "open": { "version": 4, "asn": 65533, "hold_time": 180, "router_id": "10.0.0.2", "capabilities": { "1": { "name": "multiprotocol", "families": [ "ipv4/unicast" ] }, "65": { "name": "asn4", "asn4": 65533 }, "75": { "software-version": "ExaBGP/main-c2a2ea8ebd-20240715" } } } } }
{ "exabgp": "5.0.0", "time": 1721069327.773314, "host" : "MacBook-Pro-3.local", "pid" : 23259, "ppid" : 52865, "counter": 1, "type": "open", "neighbor": { "address": { "local": "127.0.0.1", "peer": "127.0.0.1" }, "asn": { "local": 65533, "peer": 65533 } , "direction": "in", "open": { "version": 4, "asn": 65533, "hold_time": 180, "router_id": "10.0.0.2", "capabilities": { "1": { "name": "multiprotocol", "families": [ "ipv4/unicast" ] }, "65": { "name": "asn4", "asn4": 65533 }, "75": { "software": "ExaBGP/main-c2a2ea8ebd-20240715" } } } } }
4 changes: 2 additions & 2 deletions src/exabgp/bgp/message/open/capability/capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from exabgp.bgp.message.open.capability.refresh import EnhancedRouteRefresh
from exabgp.bgp.message.open.capability.extended import ExtendedMessage
from exabgp.bgp.message.open.capability.hostname import HostName
from exabgp.bgp.message.open.capability.software_version import SoftwareVersion
from exabgp.bgp.message.open.capability.software import Software

from exabgp.bgp.message.notification import Notify

Expand Down Expand Up @@ -147,7 +147,7 @@ def _software_version(self, neighbor):
if not neighbor['capability']['software-version']:
return

self[Capability.CODE.SOFTWARE_VERSION] = SoftwareVersion()
self[Capability.CODE.SOFTWARE_VERSION] = Software()

def _operational(self, neighbor):
if not neighbor['capability']['operational']:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


@Capability.register()
class SoftwareVersion(Capability):
class Software(Capability):
ID = Capability.CODE.SOFTWARE_VERSION
SOFTWARE_VERSION_MAX_LEN = 64

Expand All @@ -25,10 +25,10 @@ def __init__(self):
self.software_version = software_version

def __str__(self):
return 'SoftwareVersion(%s)' % self.software_version
return 'Software(%s)' % self.software_version

def json(self):
return '{ "software-version": "%s" }' % self.software_version
return '{ "software": "%s" }' % self.software_version

def extract(self):
return [bytes([len(self.software_version)]) + self.software_version.encode('utf-8')]
Expand Down

0 comments on commit 3678343

Please sign in to comment.