Created
September 14, 2017 06:49
-
-
Save wolfoo2931/a5de6fce54de493fff73d4c75275caf2 to your computer and use it in GitHub Desktop.
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
deployment_name=<your-bosh-deployment-name> #e.g. d30cf96 | |
deployer_api_pwd=<the-deployer-api-password> | |
deployer_api_ip=<the-deployer-api-ip-address> | |
template_name=$(curl admin:${deployer_api_pwd}@${deployer_api_ip}:3000/deployments.json | jq -r ".[] | select(.name == \"${deployment_name}\") | .template_name") | |
template_content=$(curl admin:${deployer_api_pwd}@${deployer_api_ip}:3000/templates.json | jq -r ".[] | select(.name == \"${template_name}\") | .content" | ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))') | |
echo $template_content | jq '.jobs' | jq -r '.[].vm_type' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment