diff --git a/app/models/manageiq/providers/ibm_power_hmc/infra_manager/template.rb b/app/models/manageiq/providers/ibm_power_hmc/infra_manager/template.rb index f0df3311..41d20462 100644 --- a/app/models/manageiq/providers/ibm_power_hmc/infra_manager/template.rb +++ b/app/models/manageiq/providers/ibm_power_hmc/infra_manager/template.rb @@ -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