ansible-collections / arista.eos

Ansible Network Collection for Arista EOS
GNU General Public License v3.0
81 stars 64 forks source link

fix(eos_config): change value validationfor parameter diff_against with value validate_config #503

Open philippebureau opened 7 months ago

philippebureau commented 7 months ago
SUMMARY

fixes #501

changing the value against what the module test for "replace" to append "rollback clean-config"

The previous behaviour was causing the module not to append "rollback clean-config" with method "get_session_config"

The returned "after" value was a sum of running-config + intended_config which makes the diff between before and after innacurate

ISSUE TYPE
COMPONENT NAME

eos_config / diff_against

ADDITIONAL INFORMATION

change the replace conditional value check to allows the returned "after" value to show the actual intended config and not a merge of intended and running-config

philippebureau commented 7 months ago

ready to review

softwarefactory-project-zuul[bot] commented 7 months ago

Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/fab331f9d2864df397ffb97ac163cd60

:heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable215 SUCCESS in 39m 59s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable214 SUCCESS in 46m 38s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable213 SUCCESS in 36m 00s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable212 SUCCESS in 37m 10s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable211 SUCCESS in 36m 38s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario01 SUCCESS in 32m 15s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario02 SUCCESS in 36m 23s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario01 SUCCESS in 33m 01s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario02 SUCCESS in 36m 03s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 33m 58s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 40m 16s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 33m 06s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 40m 42s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 33m 05s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 39m 48s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 33m 09s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 39m 31s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 35m 35s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 34m 30s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 36m 39s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 38m 47s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 SUCCESS in 32m 37s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 39m 56s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 SUCCESS in 32m 44s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 40m 01s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 9m 53s :heavy_check_mark: ansible-tox-linters SUCCESS in 12m 12s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 01s

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.76%. Comparing base (c1950c9) to head (6d25a6f).

:exclamation: Current head 6d25a6f differs from pull request most recent head 8872830. Consider uploading reports for the commit 8872830 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #503 +/- ## ======================================= Coverage 82.76% 82.76% ======================================= Files 153 153 Lines 11967 11967 ======================================= Hits 9904 9904 Misses 2063 2063 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

softwarefactory-project-zuul[bot] commented 6 months ago

Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/59947bccc03c4b4da9af25e9507daf2e

:heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable215 SUCCESS in 39m 43s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable214 SUCCESS in 44m 02s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable213 SUCCESS in 39m 53s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable212 SUCCESS in 40m 05s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable211 SUCCESS in 38m 03s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario01 SUCCESS in 33m 01s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario02 SUCCESS in 35m 45s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario01 SUCCESS in 34m 13s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario02 SUCCESS in 36m 18s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 32m 29s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 37m 08s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 38m 14s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 34m 44s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 31m 53s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 34m 17s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 31m 16s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 39m 14s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 35m 50s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 38m 35s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 35m 26s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 35m 34s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 SUCCESS in 32m 57s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 35m 29s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 SUCCESS in 33m 19s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 35m 48s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 10m 09s :heavy_check_mark: ansible-tox-linters SUCCESS in 12m 37s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 48s

rohitthakur2590 commented 6 months ago

@philippebureau Thank for the contribution. Could you please changelog and test it if possible?

softwarefactory-project-zuul[bot] commented 6 months ago

Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/53b0a9402c93407eb5431d34eb16597c

:heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable215 SUCCESS in 40m 01s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable214 SUCCESS in 45m 20s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable213 SUCCESS in 35m 17s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable212 SUCCESS in 35m 23s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable211 SUCCESS in 35m 26s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario01 SUCCESS in 31m 54s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario02 SUCCESS in 35m 12s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario01 SUCCESS in 32m 56s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario02 SUCCESS in 34m 34s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 32m 26s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 39m 06s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 31m 41s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 39m 22s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 31m 05s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 39m 18s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 32m 20s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 39m 02s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 31m 57s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 38m 25s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 33m 39s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 37m 33s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 SUCCESS in 33m 28s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 38m 28s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 SUCCESS in 32m 56s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 38m 59s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 9m 53s :heavy_check_mark: ansible-tox-linters SUCCESS in 12m 00s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 5m 11s

philippebureau commented 6 months ago

@philippebureau Thank for the contribution. Could you please changelog and test it if possible?

done

rohitthakur2590 commented 5 months ago

@philippebureau This looks good, thanks for adding the changelog, could you please also add the integration test, you can add one more task in this file and have an assertion for the result.

philippebureau commented 5 months ago

the

@philippebureau This looks good, thanks for adding the changelog, could you please also add the integration test, you can add one more task in this file and have an assertion for the result.

the diff_against already had a an integration test. here

The assertion in the current test is valid.

Does the test need to be extended?

softwarefactory-project-zuul[bot] commented 4 months ago

Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/5ef69cab5d43417bb1b7a1ee7ee03b79

:heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable215 SUCCESS in 40m 53s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable214 SUCCESS in 42m 47s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable213 SUCCESS in 39m 22s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable212 SUCCESS in 40m 04s :heavy_check_mark: ansible-test-network-integration-eos-httpapi-python39-stable211 SUCCESS in 40m 45s :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario01 SUCCESS in 32m 19s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable215-scenario02 SUCCESS in 34m 46s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario01 SUCCESS in 32m 06s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable215-scenario02 SUCCESS in 35m 13s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario01 SUCCESS in 37m 34s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable214-scenario02 SUCCESS in 37m 51s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario01 SUCCESS in 32m 19s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable214-scenario02 SUCCESS in 40m 54s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario01 SUCCESS in 31m 02s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable213-scenario02 SUCCESS in 39m 56s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario01 SUCCESS in 31m 12s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable213-scenario02 SUCCESS in 39m 51s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario01 SUCCESS in 31m 14s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable212-scenario02 SUCCESS in 40m 03s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario01 SUCCESS in 36m 25s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable212-scenario02 SUCCESS in 39m 51s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario01 SUCCESS in 35m 40s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-python39-stable211-scenario02 SUCCESS in 38m 22s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario01 SUCCESS in 35m 48s (non-voting) :heavy_check_mark: ansible-test-network-integration-eos-network_cli-libssh-python39-stable211-scenario02 SUCCESS in 38m 40s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 10m 45s :heavy_check_mark: ansible-tox-linters SUCCESS in 12m 13s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 5m 10s

philippebureau commented 1 month ago

@cidrblock as per discussed today at Redhat summit