Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new resource pool cpu_core_* columns #147

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down