Last active
February 9, 2016 16:05
-
-
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.
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
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