-
Notifications
You must be signed in to change notification settings - Fork 43
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 #231 from napalm-automation/develop
Merge develop into master, preparing release 0.5.0
- Loading branch information
Showing
29 changed files
with
525 additions
and
7 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 |
---|---|---|
@@ -1 +1 @@ | ||
0.5.0b5 | ||
0.5.0 |
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,35 @@ | ||
.. _release-0.5.0: | ||
|
||
================================== | ||
Release 0.5.0 - Codename Drawknife | ||
================================== | ||
|
||
Cisco IOS Support | ||
----------------- | ||
|
||
Initial support for Cisco IOS has been added thanks to Nico Vinzens | ||
(@nvinzens), providing notifications for :ref:`INTERFACE_DOWN`, | ||
:ref:`OSPF_NEIGHBOR_UP`, and :ref:`OSPF_NEIGHBOR_DOWN`. We welcome your Pull | ||
Requests to extend this list! | ||
|
||
``napalm-logs`` Docker Image | ||
---------------------------- | ||
|
||
The initial public version has been provided by Nathan Catania | ||
(@nathancatania). Starting with this release, whenever we publish a new | ||
``napalm-logs`` version, there will also be a new Docker image pushed to the | ||
Docker hub. The image can be pulled from `<https://hub.docker.com/r/mirceaulinic/napalm-logs/>`_, | ||
e.g., ``docker pull mirceaulinic/napalm-logs:0.5.0``. | ||
|
||
New Structured Messages | ||
----------------------- | ||
|
||
- :ref:`INTERFACE_DUPLEX_MODE`, currently available only for ``nxos``. | ||
|
||
The following messages were already defined, now extending the list of | ||
supported platforms: | ||
|
||
- :ref:`INTERFACE_DOWN` added for ``ios`` and ``nxos``. | ||
- :ref:`INTERFACE_UP` added for ``nxos``. | ||
- :ref:`OSPF_NEIGHBOR_UP` and :ref:`OSPF_NEIGHBOR_DOWN` added for ``ios``. | ||
- :ref:`ISIS_NEIGHBOR_DOWN` and :ref:`ISIS_NEIGHBOR_UP` defined for ``junos``. |
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
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,14 @@ | ||
# Interface GigabitEthernet2, changed state to administratively down | ||
|
||
messages: | ||
- error: INTERFACE_DOWN | ||
tag: LINK-5-CHANGED | ||
values: | ||
interface: (\w+[\.\-\d\/\w+]+) | ||
adminStatus|upper: (\w+) | ||
line: 'Interface {interface}, changed state to administratively {adminStatus}' | ||
model: openconfig-interfaces | ||
mapping: | ||
variables: | ||
interfaces//interface//{interface}//state//admin_status: adminStatus | ||
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,18 @@ | ||
#<189>521: router1: *Mar 15 10:05:53.044: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.46.4 on GigabitEthernet2.45 from INIT to DOWN, Neighbor Down: Dead timer expired | ||
|
||
messages: | ||
- error: OSPF_NEIGHBOR_DOWN | ||
tag: OSPF-5-ADJCHG | ||
values: | ||
neighborIP: ([\w\d:\.]+) | ||
interface: ([\w\d\.]+) | ||
adjacencyStateChangeReasonMessage: ([\w+\s?]+) | ||
initStatus: (\w+) | ||
line: 'Nbr {neighborIP} on {interface} from {initStatus} to DOWN, Neighbor Down: {adjacencyStateChangeReasonMessage}' | ||
model: openconfig-ospf | ||
mapping: | ||
variables: | ||
network-instances//network-instance//global//protocols//protocol//ospf//ospfv2//areas//area//area//interfaces//interface//{interface}//neighbors//neighbor//{neighborIP}//state//adjacency-state-change-reason-message: adjacencyStateChangeReasonMessage | ||
static: | ||
network-instances//network-instance//global//protocols//protocol//ospf//ospfv2//areas//area//area//interfaces//interface//{interface}//neighbors//neighbor//{neighborIP}//state//adjacency-state: DOWN | ||
network-instances//network-instance//global//protocols//protocol//ospf//ospfv2//areas//area//area//interfaces//interface//{interface}//neighbors//neighbor//{neighborIP}//state//adjacency-state-change-reason: INACTIVE_TIMER |
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 @@ | ||
#<190>521: router1: *Mar 15 10:05:53.044: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.46.4 on GigabitEthernet2.45 from LOADING to FULL, Loading Done | ||
|
||
messages: | ||
- error: OSPF_NEIGHBOR_UP | ||
tag: OSPF-5-ADJCHG | ||
values: | ||
neighbor: ([\w\d:\.]+) | ||
interface: ([\w\d\.]+) | ||
initStatus: (\w+) | ||
line: 'Nbr {neighbor} on {interface} from {initStatus} to FULL, Loading Done' | ||
model: openconfig-ospf | ||
mapping: | ||
variables: {} | ||
static: | ||
network-instances//network-instance//global//protocols//protocol//ospf//ospfv2//areas//area//area//interfaces//interface//{interface}//neighbors//neighbor//{neighbor}//state//adjacency-state: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
#<189>521: router1: *Nov 14 08:30:56.699: %LINK-5-CHANGED: Interface GigabitEthernet2, changed state to administratively down | ||
# host logging-id needs to be enabled (highly recommended) on the ios-device for the profiles to work | ||
prefixes: | ||
- time_format: "%b %d %H:%M:%S" | ||
values: | ||
messageId: (\d+) | ||
host: ([^ ]+) | ||
date: (\w+\s?\d+) | ||
time: (\d\d:\d\d:\d\d) | ||
milliseconds: (\d\d\d) | ||
tag: ([\w-]+) | ||
# some messages contain a process number (eg. OSPF related messages) | ||
processId: (\d+) | ||
line: '{messageId}: {host}: *{date} {time}.{milliseconds}: %{tag}: Process {processId}, ' | ||
- time_format: "%b %d %H:%M:%S" | ||
values: | ||
messageId: (\d+) | ||
host: ([^ ]+) | ||
date: (\w+\s?\d+) | ||
time: (\d\d:\d\d:\d\d) | ||
milliseconds: (\d+) | ||
tag: ([\w-]+) | ||
line: '{messageId}: {host}: *{date} {time}.{milliseconds}: %{tag}: ' |
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 @@ | ||
<165>Feb 6 08:27:14 veos01 Ebra: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet28 (added description in EOS 4.19.6M), changed state to 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"yang_message": { | ||
"interfaces": { | ||
"interface": { | ||
"Ethernet28": { | ||
"state": { | ||
"oper_status": "UP" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"message_details": { | ||
"severity": 5, | ||
"facility": 20, | ||
"pri": "165", | ||
"processName": "Ebra", | ||
"host": "veos01", | ||
"tag": "LINEPROTO-5-UPDOWN", | ||
"time": "08:27:14", | ||
"date": "Feb 6", | ||
"message": ": Line protocol on Interface Ethernet28 (added description in EOS 4.19.6M), changed state to up" | ||
}, | ||
"facility": 20, | ||
"ip": "127.0.0.1", | ||
"error": "INTERFACE_UP", | ||
"host": "veos01", | ||
"yang_model": "openconfig-interfaces", | ||
"timestamp": 1517905634, | ||
"os": "eos", | ||
"severity": 5 | ||
} |
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 @@ | ||
<189>521: router1: *Nov 14 08:30:56.699: %LINK-5-CHANGED: Interface GigabitEthernet2, changed state to administratively 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,33 @@ | ||
{ | ||
"yang_message": { | ||
"interfaces": { | ||
"interface": { | ||
"GigabitEthernet2": { | ||
"state": { | ||
"admin_status": "DOWN" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"message_details": { | ||
"severity": 5, | ||
"facility": 23, | ||
"pri": "189", | ||
"host": "router1", | ||
"tag": "LINK-5-CHANGED", | ||
"time": "08:30:56", | ||
"date": "Nov 14", | ||
"messageId": "521", | ||
"milliseconds": "699", | ||
"message": "Interface GigabitEthernet2, changed state to administratively down" | ||
}, | ||
"timestamp": 1507969856, | ||
"facility": 23, | ||
"ip": "127.0.0.1", | ||
"host": "router1", | ||
"yang_model": "openconfig-interfaces", | ||
"error": "INTERFACE_DOWN", | ||
"os": "ios", | ||
"severity": 5 | ||
} |
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 @@ | ||
<189>521: router1: *Mar 15 10:05:53.044: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.46.4 on GigabitEthernet2.45 from INIT to DOWN, Neighbor Down: Dead timer expired |
62 changes: 62 additions & 0 deletions
62
tests/config/ios/OSPF_NEIGHBOR_DOWN/init_to_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,62 @@ | ||
{ | ||
"yang_message": { | ||
"network-instances": { | ||
"network-instance": { | ||
"global": { | ||
"protocols": { | ||
"protocol": { | ||
"ospf": { | ||
"ospfv2": { | ||
"areas": { | ||
"area": { | ||
"area": { | ||
"interfaces": { | ||
"interface": { | ||
"GigabitEthernet2.45": { | ||
"neighbors": { | ||
"neighbor": { | ||
"172.16.46.4": { | ||
"state": { | ||
"adjacency-state-change-reason-message": "Dead timer expired", | ||
"adjacency-state": "DOWN", | ||
"adjacency-state-change-reason": "INACTIVE_TIMER" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"message_details": { | ||
"date": "Mar 15", | ||
"time": "10:05:53", | ||
"host": "router1", | ||
"processId": "1", | ||
"tag": "OSPF-5-ADJCHG", | ||
"pri": "189", | ||
"messageId": "521", | ||
"milliseconds": "044", | ||
"message": "Nbr 172.16.46.4 on GigabitEthernet2.45 from INIT to DOWN, Neighbor Down: Dead timer expired", | ||
"facility": 23, | ||
"severity": 5 | ||
}, | ||
"yang_model": "openconfig-ospf", | ||
"os": "ios", | ||
"facility": 23, | ||
"severity": 5, | ||
"error": "OSPF_NEIGHBOR_DOWN", | ||
"host": "router1", | ||
"ip": "127.0.0.1", | ||
"timestamp": 1521108353 | ||
} |
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>521: router1: *Mar 15 10:05:53.044: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.46.4 on GigabitEthernet2.45 from LOADING to FULL, Loading Done |
Oops, something went wrong.