Skip to content

Commit

Permalink
Use MiqTemplate methods to calculate cpus and mem
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcarman committed Aug 31, 2023
1 parent fe3b8e7 commit a2f02fd
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,11 @@ def cloud_volume_storage(args_hash)
end

def cloud_number_of_cpus(args_hash)
flavor = args_hash[:flavor]
$evm.log(:info, "Retrieving cloud flavor #{flavor.name} cpus => #{flavor.cpus}")
default_option(flavor.cpus, args_hash[:options_array])
args_hash[:resource].source.number_of_cpus_for_request(args_hash[:resource])
end

def cloud_vm_memory(args_hash)
flavor = args_hash[:flavor]
$evm.log(:info, "Retrieving flavor #{flavor.name} memory => #{flavor.memory}")
default_option(flavor.memory, args_hash[:options_array])
args_hash[:resource].source.memory_for_request(args_hash[:resource])
end

def cloud_value(args_hash)
Expand Down

0 comments on commit a2f02fd

Please sign in to comment.