-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from napalm-automation/nxos-msg
Adding a couple of new messages for NX-OS, and support for a different message format
- Loading branch information
Showing
12 changed files
with
211 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Interface Ethernet1/33 is down (Link failure) | ||
|
||
messages: | ||
- error: INTERFACE_DOWN | ||
tag: ETHPORT-5-IF_DOWN_LINK_FAILURE | ||
values: | ||
interface: (\w+[\.\-\d\/\w+]+) | ||
reason: (.*) | ||
line: 'Interface {interface} is down ({reason})' | ||
model: openconfig-interfaces | ||
mapping: | ||
variables: | ||
interfaces//interface//{interface}//state//change_reason: reason | ||
static: | ||
interfaces//interface//{interface}//state//admin_status: DOWN | ||
- error: INTERFACE_DOWN | ||
tag: ETH_PORT_CHANNEL-5-PORT_INDIVIDUAL_DOWN | ||
values: | ||
interface: (\w+[\.\-\d\/\w+]+) | ||
line: 'individual port {interface} is down' | ||
model: openconfig-interfaces | ||
mapping: | ||
variables: {} | ||
static: | ||
interfaces//interface//{interface}//state//admin_status: DOWN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This message type is received when there's a notification that the interface | ||
# changed the duplex mode, e.g., | ||
# | ||
# .. code-block:: text | ||
# | ||
# Interface Ethernet1/33, operational duplex mode changed to Full | ||
|
||
messages: | ||
- error: INTERFACE_DUPLEX_MODE | ||
tag: ETHPORT-5-IF_DUPLEX | ||
values: | ||
interface: (\w+[\.\-\d\/\w+]+) | ||
mode|upper: (\w+) | ||
line: 'Interface {interface}, operational duplex mode changed to {mode}' | ||
model: openconfig-interfaces | ||
mapping: | ||
variables: | ||
interfaces//interface//{interface}//ethernet//state//duplex_mode: mode | ||
static: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Interface Ethernet1/33 is up in mode trunk | ||
|
||
messages: | ||
- error: INTERFACE_UP | ||
tag: ETHPORT-5-IF_UP | ||
values: | ||
interface: (\w+[\.\-\d\/\w+]+) | ||
mode|upper: (\w+) | ||
line: 'Interface {interface} is up in mode {mode}' | ||
model: openconfig-interfaces | ||
mapping: | ||
variables: | ||
interfaces//interface//{interface}//ethernet//switched_vlan//state//interface_mode: mode | ||
static: | ||
interfaces//interface//{interface}//state//admin_status: UP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<190>2018 Apr 20 13:15:07 nexus-switch %ETHPORT-5-IF_DOWN_LINK_FAILURE: Interface Ethernet1/33 is down (Link failure) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"ip": "127.0.0.1", | ||
"host": "nexus-switch", | ||
"error": "INTERFACE_DOWN", | ||
"yang_message": { | ||
"interfaces": { | ||
"interface": { | ||
"Ethernet1/33": { | ||
"state": { | ||
"admin_status": "DOWN", | ||
"change_reason": "Link failure" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"facility": 23, | ||
"yang_model": "openconfig-interfaces", | ||
"os": "nxos", | ||
"severity": 6, | ||
"message_details": { | ||
"date": "2018 Apr 20", | ||
"tag": "ETHPORT-5-IF_DOWN_LINK_FAILURE", | ||
"host": "nexus-switch", | ||
"message": "Interface Ethernet1/33 is down (Link failure)", | ||
"facility": 23, | ||
"severity": 6, | ||
"pri": "190", | ||
"time": "13:15:07" | ||
}, | ||
"timestamp": 1524230107 | ||
} |
1 change: 1 addition & 0 deletions
1
tests/config/nxos/INTERFACE_DOWN/individual_port_down/syslog.msg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<190>2018 Apr 20 13:15:07 nexus-switch %ETH_PORT_CHANNEL-5-PORT_INDIVIDUAL_DOWN: individual port Ethernet1/33 is down |
31 changes: 31 additions & 0 deletions
31
tests/config/nxos/INTERFACE_DOWN/individual_port_down/yang.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"ip": "127.0.0.1", | ||
"message_details": { | ||
"message": "individual port Ethernet1/33 is down", | ||
"time": "13:15:07", | ||
"date": "2018 Apr 20", | ||
"facility": 23, | ||
"severity": 6, | ||
"tag": "ETH_PORT_CHANNEL-5-PORT_INDIVIDUAL_DOWN", | ||
"pri": "190", | ||
"host": "nexus-switch" | ||
}, | ||
"error": "INTERFACE_DOWN", | ||
"yang_model": "openconfig-interfaces", | ||
"facility": 23, | ||
"severity": 6, | ||
"yang_message": { | ||
"interfaces": { | ||
"interface": { | ||
"Ethernet1/33": { | ||
"state": { | ||
"admin_status": "DOWN" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"host": "nexus-switch", | ||
"timestamp": 1524230107, | ||
"os": "nxos" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<190>2018 Apr 20 13:15:15 nexus-switch %ETHPORT-5-IF_DUPLEX: Interface Ethernet1/33, operational duplex mode changed to Full |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"severity": 6, | ||
"yang_message": { | ||
"interfaces": { | ||
"interface": { | ||
"Ethernet1/33": { | ||
"ethernet": { | ||
"state": { | ||
"duplex_mode": "FULL" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"yang_model": "openconfig-interfaces", | ||
"ip": "127.0.0.1", | ||
"facility": 23, | ||
"host": "nexus-switch", | ||
"error": "INTERFACE_DUPLEX_MODE", | ||
"os": "nxos", | ||
"message_details": { | ||
"date": "2018 Apr 20", | ||
"message": "Interface Ethernet1/33, operational duplex mode changed to Full", | ||
"facility": 23, | ||
"host": "nexus-switch", | ||
"severity": 6, | ||
"pri": "190", | ||
"tag": "ETHPORT-5-IF_DUPLEX", | ||
"time": "13:15:15" | ||
}, | ||
"timestamp": 1524230115 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<190>2018 Apr 20 13:15:38 nexus-switch %ETHPORT-5-IF_UP: Interface Ethernet1/33 is up in mode trunk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"facility": 23, | ||
"yang_model": "openconfig-interfaces", | ||
"yang_message": { | ||
"interfaces": { | ||
"interface": { | ||
"Ethernet1/33": { | ||
"ethernet": { | ||
"switched_vlan": { | ||
"state": { | ||
"interface_mode": "TRUNK" | ||
} | ||
} | ||
}, | ||
"state": { | ||
"admin_status": "UP" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"ip": "127.0.0.1", | ||
"host": "nexus-switch", | ||
"message_details": { | ||
"facility": 23, | ||
"pri": "190", | ||
"date": "2018 Apr 20", | ||
"message": "Interface Ethernet1/33 is up in mode trunk", | ||
"severity": 6, | ||
"time": "13:15:38", | ||
"host": "nexus-switch", | ||
"tag": "ETHPORT-5-IF_UP" | ||
}, | ||
"severity": 6, | ||
"os": "nxos", | ||
"error": "INTERFACE_UP", | ||
"timestamp": 1524230138 | ||
} |