Last active
December 24, 2015 11:29
-
-
Save srenatus/6791122 to your computer and use it in GitHub Desktop.
find active logical switch port mirror targets (NVP)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# jq: http://stedolan.github.io/jq/ | |
# resty: http://github.com/micha/resty | |
. resty | |
resty https://172.24.0.40 -u admin:admin -k # change me | |
for tnode in $(GET /ws.v1/transport-node | jq -r '.results[] | ._href'); do | |
GET $tnode/mirror | jq -r '.results[] | ._href' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment