Skip to content
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
@jedelman8

Description

@jedelman8

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions