This PR improves the logging message sent upon receiving a PortStatus OF message to help the network operator understand the network's state from the log messages (very useful for troubleshooting activities).
Before this PR, the only message that was being recorded at the logs were Modified {interface} {dpid}:{port_number}: no info about the new state and no info when other states were being recorded.
Local tests
Running Kytos with this PR and simulating a link failure and recovery gives the following log messages:
Jan 12 17:57:41 4919fb6963ef kytos.napps.kytos/of_core:INFO main:652: PortStatus modified interface 00:00:00:00:00:00:00:12:1 state 0
Jan 12 17:57:41 4919fb6963ef kytos.napps.kytos/of_core:INFO main:652: PortStatus modified interface 00:00:00:00:00:00:00:12:1 state OFPPS_LINK_DOWN
Jan 12 17:57:41 4919fb6963ef kytos.napps.kytos/of_core:INFO main:652: PortStatus modified interface 00:00:00:00:00:00:00:11:1 state 0
Jan 12 17:57:41 4919fb6963ef kytos.napps.kytos/of_core:INFO main:652: PortStatus modified interface 00:00:00:00:00:00:00:11:1 state OFPPS_LINK_DOWN
Jan 12 17:57:51 4919fb6963ef kytos.napps.kytos/of_core:INFO main:652: PortStatus modified interface 00:00:00:00:00:00:00:12:1 state OFPPS_LIVE
Jan 12 17:57:51 4919fb6963ef kytos.napps.kytos/of_core:INFO main:652: PortStatus modified interface 00:00:00:00:00:00:00:11:1 state OFPPS_LIVE
Fixes #7
Description of the change
This PR improves the logging message sent upon receiving a PortStatus OF message to help the network operator understand the network's state from the log messages (very useful for troubleshooting activities).
Before this PR, the only message that was being recorded at the logs were
Modified {interface} {dpid}:{port_number}
: no info about the new state and no info when other states were being recorded.Local tests
Running Kytos with this PR and simulating a link failure and recovery gives the following log messages: