Skip to content

interface: add depth parameter to get_facts#29

Open
alagoutte wants to merge 1 commit intoaruba:masterfrom
alagoutte:interface_get_facts_depth
Open

interface: add depth parameter to get_facts#29
alagoutte wants to merge 1 commit intoaruba:masterfrom
alagoutte:interface_get_facts_depth

Conversation

@alagoutte
Copy link

sometimes like for check if an interface exist, you need only to get depth with length 1

avoid to get all data (more speed and efficentiy )

example with Aruba-CX OVA :

with depth=1
"GET /rest/v10.09/system/interfaces?depth=1 HTTP/1.1" "/rest/v10.09/system/interfaces?depth=1" 200 3068 "-" "python-requests/2.28.1"

with depth=2
"GET /rest/v10.09/system/interfaces?depth=2 HTTP/1.1" "/rest/v10.09/system/interfaces?depth=2" 200 1256622 "-" "python-requests/2.28.1" -

3Kb vs 1.19Mb !

sometimes like for check if an interface exist, you need only to get depth with length 1

avoid to get all data (more speed and efficentiy )

example with Aruba-CX OVA :

with depth=1
"GET /rest/v10.09/system/interfaces?depth=1 HTTP/1.1" "/rest/v10.09/system/interfaces?depth=1" 200 3068 "-" "python-requests/2.28.1"

with depth=2
"GET /rest/v10.09/system/interfaces?depth=2 HTTP/1.1" "/rest/v10.09/system/interfaces?depth=2" 200 1256622 "-" "python-requests/2.28.1" -

3Kb vs 1.19Mb !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant