Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wolfoo2931/a5de6fce54de493fff73d4c75275caf2 to your computer and use it in GitHub Desktop.
Save wolfoo2931/a5de6fce54de493fff73d4c75275caf2 to your computer and use it in GitHub Desktop.
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