Merge "Adapt to the new [pci] device_spec parameter"

This commit is contained in:
Zuul 2022-08-18 16:57:12 +00:00 committed by Gerrit Code Review
commit 04b198f7f5
2 changed files with 16 additions and 11 deletions

View File

@ -24,6 +24,11 @@ class nova::compute::pci(
$passthrough_real = $::os_service_default
}
nova_config {
'pci/passthrough_whitelist': value => $passthrough_real;
'pci/device_spec': value => $passthrough_real;
}
# TODO(tkajinam): Remove this after Zed release.
nova_config {
'pci/passthrough_whitelist': ensure => absent;
}
}

View File

@ -4,8 +4,8 @@ describe 'nova::compute::pci' do
shared_examples_for 'nova-compute-pci' do
context 'with default parameters' do
it 'clears pci_passthrough_whitelist configuration' do
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(:value => '<SERVICE DEFAULT>')
it 'clears pci device_spec configuration' do
is_expected.to contain_nova_config('pci/device_spec').with(:value => '<SERVICE DEFAULT>')
end
end
@ -25,8 +25,8 @@ describe 'nova::compute::pci' do
],
}
end
it 'configures nova pci_passthrough_whitelist entries' do
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(
it 'configures nova pci device_spec entries' do
is_expected.to contain_nova_config('pci/device_spec').with(
'value' => ['{"vendor_id":"8086","product_id":"0126"}','{"vendor_id":"9096","product_id":"1520","physical_network":"physnet1"}']
)
end
@ -39,8 +39,8 @@ describe 'nova::compute::pci' do
}
end
it 'configures nova pci_passthrough_whitelist entries' do
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(
it 'configures nova pci device_spec entries' do
is_expected.to contain_nova_config('pci/device_spec').with(
'value' => ['{"vendor_id":"8086","product_id":"0126"}','{"vendor_id":"9096","product_id":"1520","physical_network":"physnet1"}']
)
end
@ -53,8 +53,8 @@ describe 'nova::compute::pci' do
}
end
it 'clears pci_passthrough_whitelist configuration' do
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(:value => '<SERVICE DEFAULT>')
it 'clears pci device_spec configuration' do
is_expected.to contain_nova_config('pci/device_spec').with(:value => '<SERVICE DEFAULT>')
end
end
@ -65,8 +65,8 @@ describe 'nova::compute::pci' do
}
end
it 'clears pci_passthrough_whitelist configuration' do
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(:value => '<SERVICE DEFAULT>')
it 'clears pci device_spec configuration' do
is_expected.to contain_nova_config('pci/device_spec').with(:value => '<SERVICE DEFAULT>')
end
end
end