Remove parameter nova::compute::pci_passthrough
The pci_passthrough parameter is deprecated. Please use nova::compute::pci::passthrough instead. Change-Id: Iccf86f42448d2e7e682728cb82808f91b6d8124e
This commit is contained in:
@@ -142,16 +142,6 @@
|
|||||||
# will disable itself.
|
# will disable itself.
|
||||||
# Defaults to $::os_service_default
|
# 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 (
|
class nova::compute (
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
@@ -183,8 +173,6 @@ class nova::compute (
|
|||||||
$barbican_api_version = $::os_service_default,
|
$barbican_api_version = $::os_service_default,
|
||||||
$max_concurrent_live_migrations = $::os_service_default,
|
$max_concurrent_live_migrations = $::os_service_default,
|
||||||
$consecutive_build_service_disable_threshold = $::os_service_default,
|
$consecutive_build_service_disable_threshold = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
$pci_passthrough = undef,
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::deps
|
include ::nova::deps
|
||||||
@@ -194,11 +182,6 @@ class nova::compute (
|
|||||||
|
|
||||||
include ::nova::pci
|
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
|
# cryptsetup is required when Barbican is encrypting volumes
|
||||||
if $keymgr_api_class =~ /barbican/ {
|
if $keymgr_api_class =~ /barbican/ {
|
||||||
ensure_packages('cryptsetup', {
|
ensure_packages('cryptsetup', {
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- Remove parameter nova::compute::pci_passthrough
|
||||||
|
The pci_passthrough parameter is deprecated. Please use
|
||||||
|
nova::compute::pci::passthrough instead.
|
@@ -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_requires('Anchor[nova::install::begin]')
|
||||||
is_expected.to contain_package('genisoimage').that_comes_before('Anchor[nova::install::end]')
|
is_expected.to contain_package('genisoimage').that_comes_before('Anchor[nova::install::end]')
|
||||||
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
|
end
|
||||||
|
|
||||||
context 'with overridden parameters' do
|
context 'with overridden parameters' do
|
||||||
@@ -146,59 +141,14 @@ describe 'nova::compute' do
|
|||||||
end
|
end
|
||||||
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
|
context 'when vcpu_pin_set and pci params are empty' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :vcpu_pin_set => "",
|
{ :vcpu_pin_set => ""}
|
||||||
:pci_passthrough => ""}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'clears vcpu_pin_set configuration' do
|
it 'clears vcpu_pin_set configuration' do
|
||||||
is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:value => '<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('DEFAULT/vcpu_pin_set').with(:value => '<SERVICE DEFAULT>')
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
context 'with neutron_enabled set to false' do
|
context 'with neutron_enabled set to false' do
|
||||||
|
Reference in New Issue
Block a user