Skip to content

Instantly share code, notes, and snippets.

@allomov
Last active February 9, 2016 16:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allomov/f8700e0fe38debc59e55 to your computer and use it in GitHub Desktop.
Save allomov/f8700e0fe38debc59e55 to your computer and use it in GitHub Desktop.
Just for case you need to update organization in CF by names. (to get quota list use `cf quotas` command). This solution is described here http://docs.pivotal.io/pivotalcf/opsguide/change-quota-plan.html.
org_name=my-org
quota_name=runaway
org_guid=$(CF_TRACE=true cf org $org_name | grep -B7 $org_name | grep guid | awk '{gsub(/\"guid\":|\ |\"|\,/,"")}1')
quota_guid=$(cf curl /v2/quota_definitions -X 'GET' | grep -B7 runaway | grep guid | awk '{gsub(/\"guid\":|\ |\"|\,/,"")}1')
cf curl /v2/organizations/$org_guid -X 'PUT' -d "{\"quota_definition_guid\":\"$quota_guid\"}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment