Module: HostExt::Proxmox::ForVm::ClassMethods

Defined in:
app/models/concerns/host_ext/proxmox/for_vm.rb

Instance Method Summary collapse

Instance Method Details

#for_vm_uuid(cr, vm) ⇒ Object



25
26
27
28
29
# File 'app/models/concerns/host_ext/proxmox/for_vm.rb', line 25

def for_vm_uuid(cr, vm)
  uuid = vm&.identity
  uuid = cr.id.to_s + '_' + vm&.identity.to_s if cr.instance_of?(ForemanFogProxmox::Proxmox)
  where(:compute_resource_id => cr.id, :uuid => uuid)
end