diff --git a/app/models/manageiq/providers/ibm_power_hmc/inventory/parser/infra_manager.rb b/app/models/manageiq/providers/ibm_power_hmc/inventory/parser/infra_manager.rb index 0bf0315b..982ad96d 100644 --- a/app/models/manageiq/providers/ibm_power_hmc/inventory/parser/infra_manager.rb +++ b/app/models/manageiq/providers/ibm_power_hmc/inventory/parser/infra_manager.rb @@ -648,17 +648,17 @@ def parse_cpu_resource_pools :type => ManageIQ::Providers::IbmPowerHmc::InfraManager::ProcessorResourcePool.name } if pool.name == "DefaultPool" - params[:cpu_shares] = 0 - params[:cpu_reserve] = 0 - params[:cpu_reserve_expand] = false - params[:cpu_limit] = -1 - params[:is_default] = true + params[:cpu_cores_reserve] = 0 + params[:cpu_reserve_expand] = false + params[:cpu_cores_limit] = -1 + params[:cpu_cores_available] = nil + params[:is_default] = true else - params[:cpu_shares] = pool.max.to_f - pool.available.to_f - params[:cpu_reserve] = pool.available - params[:cpu_reserve_expand] = true - params[:cpu_limit] = pool.max - params[:is_default] = false + params[:cpu_cores_reserve] = pool.reserved + params[:cpu_reserve_expand] = true + params[:cpu_cores_limit] = pool.max + params[:cpu_cores_available] = pool.available + params[:is_default] = false end persister.resource_pools.build(params) diff --git a/spec/models/manageiq/providers/ibm_power_hmc/infra_manager/refresher_spec.rb b/spec/models/manageiq/providers/ibm_power_hmc/infra_manager/refresher_spec.rb index d61900aa..c65645d2 100644 --- a/spec/models/manageiq/providers/ibm_power_hmc/infra_manager/refresher_spec.rb +++ b/spec/models/manageiq/providers/ibm_power_hmc/infra_manager/refresher_spec.rb @@ -337,7 +337,16 @@ def assert_specific_template def assert_specific_resource_pool_cpu cpu_pool = ems.resource_pools.find_by(:ems_ref => respool_cpu_uuid) expect(cpu_pool).to have_attributes( - :type => "ManageIQ::Providers::IbmPowerHmc::InfraManager::ProcessorResourcePool" + :type => "ManageIQ::Providers::IbmPowerHmc::InfraManager::ProcessorResourcePool", + :name => "sloane", + :cpu_shares => nil, + :cpu_reserve => nil, + :cpu_limit => nil, + :cpu_reserve_expand => true, + :is_default => false, + :cpu_cores_available => 2.0, + :cpu_cores_reserve => 0, + :cpu_cores_limit => 2.0 ) end