Skip to content

Commit

Permalink
Override memory and cpu quota calculation methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcarman committed Oct 18, 2023
1 parent 8713488 commit 0a9a770
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,16 @@ def make_clone(options)
raise
end
end

def memory_for_request(request)
template = ManageIQ::Providers::IbmPowerHmc::InfraManager::Template.find(request.src_vm_id)
hardware = Hardware.find_by(:vm_or_template_id => template.id)
hardware.memory_mb.megabytes
end

def number_of_cpus_for_request(request)
template = ManageIQ::Providers::IbmPowerHmc::InfraManager::Template.find(request.src_vm_id)
hardware = Hardware.find_by(:vm_or_template_id => template.id)
hardware.cpu_total_cores
end
end

0 comments on commit 0a9a770

Please sign in to comment.