foreman/app/models/concerns/fog_extensions/ovirt/server.rb @ c6e02bd3
1c81c2b9 | Ohad Levy | module FogExtensions
|
|
module Ovirt
|
|||
module Server
|
|||
dc457681 | Joseph Mitchell Magen | extend ActiveSupport::Concern
|
|
a490a1a4 | Ohad Levy | ||
c6e02bd3 | Joseph Magen | include ActionView::Helpers::NumberHelper
|
|
a490a1a4 | Ohad Levy | def state
|
|
status
|
|||
end
|
|||
1c81c2b9 | Ohad Levy | def interfaces_attributes=(attrs); end
|
|
def volumes_attributes=(attrs); end
|
|||
40df7dfb | Daniel Lobato | def poweroff
|
|
service.vm_action(:id =>id, :action => :shutdown)
|
|||
end
|
|||
def reset
|
|||
poweroff
|
|||
start
|
|||
end
|
|||
c6e02bd3 | Joseph Magen | def vm_description
|
|
_("%{cores} Cores and %{memory} memory") % {:cores => cores, :memory => number_to_human_size(memory.to_i)}
|
|||
end
|
|||
1c81c2b9 | Ohad Levy | end
|
|
end
|
|||
end
|