This repository was archived by the owner on Sep 17, 2019. It is now read-only.
This repository was archived by the owner on Sep 17, 2019. It is now read-only.
update napalm ping response keys #240
Open
Description
Reference: napalm-automation/napalm-ansible#53
one thing I'm thinking about within the ansible module and @dbarrosop sugessted maybe we just update the ping
method within NAPALM so we can keep the ansible module a wrapper.
Normalizing the key used regardless if success or error.
Today it's this:
# when echo request succeeds
"{"success": {"packet_loss": 0, "probes_sent": 2,
"results": [{"ip_address": "10.0.0.5:", "rtt": 1.71},
{"ip_address": "10.0.0.5:", "rtt": 0.733}],
"rtt_avg": 1.225, "rtt_max": 1.718, "rtt_min": 0.733,
"rtt_stddev": 0.493}}
# when echo request fails
{"error": "connect: Network is unreachable\n"}}
I'd rather see a status key that has success or error as values. Then a msg key for the error message and results for the dict of results. What are your thoughts?