napalm-logs
napalm-logs copied to clipboard
[385] Fix for stuck consumers due to unsafe host key access
This PR addresses: https://github.com/napalm-automation/napalm-logs/issues/385
Vendors like IOS-XR by default send messages with no hostname. The napalm-logs ios-xr parser was updated to support this default behaviour. However, server.py has unsafe access logic for the host key in msg_dict which can cause the consumer/listeners to become stuck as they are expecting messages to have a host key for lookup.
This PR turns makes the host key access safe and returns a default value of "unknown" if the host key doesn't exist.
Signed-off-by: Adrian Arumugam [email protected]