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::Account[] || 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::Account[] || raise(Thor::Error, "Unknown Account UUID: #{}")
  puts ERB.new(<<__END, nil, '-').result(binding)
Instance total weight:
  <%= acc.quota.instance_total_weight %>
Volume total size:
  <%= acc.quota.volume_total_size %>
__END
end