Browse Source

Remove parameter nova::compute::pci_passthrough

The pci_passthrough parameter is deprecated. Please use
nova::compute::pci::passthrough instead.

Change-Id: Iccf86f42448d2e7e682728cb82808f91b6d8124e
changes/51/510151/4
zhangyangyang 4 years ago
parent
commit
d845b6f0ae
3 changed files with 6 additions and 68 deletions
  1. +0
    -17
      manifests/compute.pp
  2. +5
    -0
      releasenotes/notes/remove_pci_passthrough-72bc7002ec8436b2.yaml
  3. +1
    -51
      spec/classes/nova_compute_spec.rb

+ 0
- 17
manifests/compute.pp View File

@ -142,16 +142,6 @@
# will disable itself.
# Defaults to $::os_service_default
#
# DEPRECATED
#
# [*pci_passthrough*]
# DEPRECATED. Use nova::compute::pci::passthrough instead.
# (optional) Pci passthrough list of hash.
# Defaults to undef
# Example of format:
# [ { "vendor_id" => "1234","product_id" => "5678" },
# { "vendor_id" => "4321","product_id" => "8765", "physical_network" => "default" } ]
#
class nova::compute (
$enabled = true,
$manage_service = true,
@ -183,8 +173,6 @@ class nova::compute (
$barbican_api_version = $::os_service_default,
$max_concurrent_live_migrations = $::os_service_default,
$consecutive_build_service_disable_threshold = $::os_service_default,
# DEPRECATED PARAMETERS
$pci_passthrough = undef,
) {
include ::nova::deps
@ -194,11 +182,6 @@ class nova::compute (
include ::nova::pci
if $pci_passthrough {
warning('The pci_passthrough parameter is deprecated. Please use nova::compute::pci::passthrough instead.')
}
include ::nova::compute::pci
# cryptsetup is required when Barbican is encrypting volumes
if $keymgr_api_class =~ /barbican/ {
ensure_packages('cryptsetup', {


+ 5
- 0
releasenotes/notes/remove_pci_passthrough-72bc7002ec8436b2.yaml View File

@ -0,0 +1,5 @@
---
upgrade:
- Remove parameter nova::compute::pci_passthrough
The pci_passthrough parameter is deprecated. Please use
nova::compute::pci::passthrough instead.

+ 1
- 51
spec/classes/nova_compute_spec.rb View File

@ -60,11 +60,6 @@ describe 'nova::compute' do
is_expected.to contain_package('genisoimage').that_requires('Anchor[nova::install::begin]')
is_expected.to contain_package('genisoimage').that_comes_before('Anchor[nova::install::end]')
end
it 'configures nova pci_passthrough_whitelist' do
is_expected.to contain_class('nova::compute::pci')
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(:value => '<SERVICE DEFAULT>')
end
end
context 'with overridden parameters' do
@ -146,59 +141,14 @@ describe 'nova::compute' do
end
end
context 'with pci params array' do
let :params do
{
:pci_passthrough => [
{
"vendor_id" => "8086",
"product_id" => "0126"
},
{
"vendor_id" => "9096",
"product_id" => "1520",
"physical_network" => "physnet1"
}
],
}
end
it 'configures nova pci_passthrough_whitelist entries' do
is_expected.to contain_class('nova::compute::pci')
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(
'value' => ['{"vendor_id":"8086","product_id":"0126"}','{"vendor_id":"9096","product_id":"1520","physical_network":"physnet1"}']
)
end
end
context 'with pci params JSON encoded string (deprecated)' do
let :params do
{
:pci_passthrough => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"physical_network\":\"physnet1\"}]",
}
end
it 'configures nova pci_passthrough_whitelist entries' do
is_expected.to contain_class('nova::compute::pci')
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(
'value' => ['{"vendor_id":"8086","product_id":"0126"}','{"vendor_id":"9096","product_id":"1520","physical_network":"physnet1"}']
)
end
end
context 'when vcpu_pin_set and pci params are empty' do
let :params do
{ :vcpu_pin_set => "",
:pci_passthrough => ""}
{ :vcpu_pin_set => ""}
end
it 'clears vcpu_pin_set configuration' do
is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:value => '<SERVICE DEFAULT>')
end
it 'clears pci_passthrough configuration' do
is_expected.to contain_class('nova::compute::pci')
is_expected.to contain_nova_config('pci/passthrough_whitelist').with(:value => '<SERVICE DEFAULT>')
end
end
context 'with neutron_enabled set to false' do


Loading…
Cancel
Save