Filtering Cisco API Output
文章介绍了一种优化脚本的方法,通过改变数据检索方式来提高效率,使用fabricNode类和Viewer工具查询过滤参数,并调整API调用以实现相同效果。 2026-1-11 16:46:23 Author: www.adainese.it(查看原文) 阅读量:3 收藏

Post cover

Previously, we created a simple script to print a table of CDP neighbors for all interfaces in the fabric. While writing it, we realized it could be optimized.

To optimize the script, we need to change the way we retrieve data.

The class used to get the fabric nodes is fabricNode. Open the Viewer and perform a query with role == leaf:

Patreon Image

In the address bar, we can see that parameters have been added to filter the query. To achieve the same effect using the APIs, we need to call this URL:

Continue reading the post on Patreon .


文章来源: https://www.adainese.it/blog/2026/01/11/filtering-cisco-api-output/
如有侵权请联系:admin#unsafe.sh