Class: Dcmgr::Cli::Quota

Inherits:
Base
  • Object
show all
Defined in:
lib/dcmgr/cli/quota.rb

Constant Summary collapse

M =
Dcmgr::Models

Instance Method Summary collapse

Instance Method Details

#modify(account_uuid) ⇒ Object



11
12
13
14
# File 'lib/dcmgr/cli/quota.rb', line 11

def modify()
  acc = M::[] || UnknownUUIDError.raise()
  super(M::Quota,acc.quota.canonical_uuid,{:instance_total_weight => options[:weight], :volume_total_size => options[:size]})
end

#show(account_uuid) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/dcmgr/cli/quota.rb', line 17

def show()
  acc = M::[] || raise(Thor::Error, "Unknown Account UUID: #{account_uuid}")
  puts ERB.new("Instance total weight:\n  <%= acc.quota.instance_total_weight %>\nVolume total size:\n  <%= acc.quota.volume_total_size %>\n", nil, '-').result(binding)
end