Class: CFAdmin::SetQuota

Inherits:
CF::CLI
  • Object
show all
Defined in:
lib/admin-cf-plugin/set_quota.rb

Instance Method Summary collapse

Instance Method Details

#preconditionObject



5
6
7
# File 'lib/admin-cf-plugin/set_quota.rb', line 5

def precondition
  check_target
end

#set_quotaObject



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/admin-cf-plugin/set_quota.rb', line 18

def set_quota
  org = input[:organization]
  quota = input[:quota_definition]

  with_progress(<<MESSAGE.chomp) do
Setting quota of #{c(org.name, :name)} to #{c(quota.name, :name)}
MESSAGE
    org.quota_definition = quota
    org.update!
  end
end