aristanetworks / ansible-cvp

Ansible modules for Arista CloudVision
http://cvp.avd.sh
Apache License 2.0
66 stars 61 forks source link

Refactor: Avoid redundant API calls #592

Closed ClausHolbechArista closed 1 year ago

ClausHolbechArista commented 1 year ago

Change Summary

Improve performance of especially cv_device_v3 by avoiding redundant API calls.

Component(s) name

Proposed changes

How to test

Pass all CI.

Testing with small 6 device inventory in 3 containers. No imagebundles.

Before

After

Checklist

User Checklist

Repository Checklist

github-actions[bot] commented 1 year ago

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] commented 1 year ago

Conflicts have been resolved. A maintainer will review the pull request shortly.

rwedmonds commented 1 year ago

PR Test Results

PR # Test Command Output Time
592 Initial run ansible-playbook cv_device_v3/pr_592.yaml -i inventory.yaml LAY [cv_container_v3] ****

TASK [Configure containers on CloudVision] ****
changed: [CloudVision]

TASK [Push configlets] ****
changed: [CloudVision]

TASK [Move devices on CloudVision] ****
changed: [CloudVision]

PLAY RECAP ****
CloudVision : ok=3 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
68 seconds
Subsequent run ansible-playbook cv_device_v3/pr_592.yaml -i inventory.yaml PLAY [cv_container_v3] ****

TASK [Configure containers on CloudVision] ****
ok: [CloudVision]

TASK [Push configlets] ****
changed: [CloudVision]

TASK [Move devices on CloudVision] ****
ok: [CloudVision]

PLAY RECAP ****
CloudVision : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
19 seconds