napalm-automation / napalm-base

Apache License 2.0
32 stars 48 forks source link

Enhance "validate" to display a "wanted / found" section #290

Open bdlamprecht opened 7 years ago

bdlamprecht commented 7 years ago

Currently, in the validate section, it can be difficult to see differences between what is desired and that is the actual value.

This is to request some type of requested_value in addition to the existing actual_value in the compliance_report.

For example (using the Ansible napalm_validate module):

TASK [debug] ********************************************
ok: [btv-vba-a] => {
    "dev_validate": {
        "changed": false,
        "compliance_report": {
            "complies": false,
            "get_facts": {
                "complies": false,
                "extra": [],
                "missing": [],
                "present": {
                    "hostname": {
                        "requested_value: "foo-bar",
                        "actual_value": "btv-vba-a",
                        "complies": false,
                        "nested": false
                    }
                }
            },
            "skipped": []
        }
    }
}