Skip to content

Commit c2da3b0

Browse files
committed
fix parsing issue in the show cdp neighbor detail command
1 parent 8ced0f7 commit c2da3b0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎automate-ssh-with-netmiko/collect-cdp-information.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def get_cdp_neighbor_details(ip, username, password, enable_secret):
107107
edge = {
108108
"from": 1,
109109
"to": counter,
110-
"title": "from: %s<br>to: %s" % (e[4], e[5]),
110+
"title": "from: %s<br>to: %s" % (e[5], e[4]),
111111
"label": "",
112112
"value": 0,
113113
"font": {

‎automate-ssh-with-netmiko/show_cdp_neighbor_detail.textfsm‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Start
1111
^Device ID: ${dest_host}
1212
^Entry address\(es\): -> ParseIP
1313
^Platform: ${platform},
14-
^Interface: ${remote_port}, Port ID \(outgoing port\): ${local_port}
14+
^Interface: ${local_port}, Port ID \(outgoing port\): ${remote_port}
1515
^Version : -> GetVersion
1616

1717
ParseIP

0 commit comments

Comments
 (0)