Closed ClausHolbechArista closed 1 year ago
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
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 |
Change Summary
Improve performance of especially
cv_device_v3
by avoiding redundant API calls.Component(s) name
configlet_tools.py
container_tools.py
device_tools.py
Proposed changes
lru_cache
on some methods with API calls, to cache the result for repeated calls.lru_cache
for containers when containers are created/deleted.How to test
Pass all CI.
Testing with small 6 device inventory in 3 containers. No imagebundles.
Before
After
Checklist
User Checklist
Repository Checklist