Cleanup device addresses of vgpu type when empty
This change makes sure that device_addresses parameter is unset when empty list of device addresses is associated with a vgpu type, so that unmanaged parameter is not left. Change-Id: Id6a354401b3233d3a17081d97a1a0e25f24d3219
This commit is contained in:
parent
fbf77c0776
commit
851dc512e1
@ -43,6 +43,10 @@ class nova::compute::vgpu(
|
||||
nova_config {
|
||||
"vgpu_${vgpu_type}/device_addresses": value => join(any2array($device_addresses), ',');
|
||||
}
|
||||
} else {
|
||||
nova_config {
|
||||
"vgpu_${vgpu_type}/device_addresses": ensure => absent;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -29,6 +29,7 @@ describe 'nova::compute::vgpu' do
|
||||
}
|
||||
end
|
||||
it { is_expected.to contain_nova_config('devices/enabled_vgpu_types').with_value('nvidia-35') }
|
||||
it { is_expected.to contain_nova_config('vgpu_nvidia-35/device_addresses').with_ensure('absent') }
|
||||
end
|
||||
|
||||
context 'with multiple vgpu devices' do
|
||||
|
Loading…
Reference in New Issue
Block a user