Last active
August 29, 2015 14:12
-
-
Save nakomis/9960d5a961716cc95ae5 to your computer and use it in GitHub Desktop.
Deletes all applications from an Apache Brooklyn catalog
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
Linux | |
===== | |
wget -O- http://admin:password@127.0.0.1:8081/v1/catalog/applications | \ | |
grep -o 'symbolicName\"\:\"[^\"]*\"' | \ | |
grep -oP '(?<=\:\")[^\"]*' | \ | |
while read c; do curl -u admin:password -X DELETE http://127.0.0.1:8081/v1/catalog/entities/$c; done | |
Mac (requires ack - `brew install ack` or `sudo port install ack`) | |
======================================================================= | |
wget -O- http://admin:password@127.0.0.1:8081/v1/catalog/applications | \ | |
grep -o 'symbolicName\"\:\"[^\"]*\"' | \ | |
ack -o '(?<=\:\")[^\"]*' | \ | |
while read c; do curl -u admin:password -X DELETE http://127.0.0.1:8081/v1/catalog/entities/$c; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment