Skip to content

Instantly share code, notes, and snippets.

@nakomis
Last active August 29, 2015 14:12
Show Gist options
  • Save nakomis/9960d5a961716cc95ae5 to your computer and use it in GitHub Desktop.
Save nakomis/9960d5a961716cc95ae5 to your computer and use it in GitHub Desktop.
Deletes all applications from an Apache Brooklyn catalog
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