Add parameter for `libvirt/num_pcie_ports`
Add parameter `num_pcie_ports` to specify the number of PCIe ports an instance will get. Libvirt allows a custom number of PCIe ports (pcie-root-port controllers) a target instance will get. Some will be used by default, rest will be available for hotplug use. Change-Id: I16732c9d6013112381cfad999540dd41ec3d7ba3
This commit is contained in:
parent
282ef4e391
commit
3e7cd134f8
|
@ -162,6 +162,13 @@
|
|||
# nfs man page for details.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*num_pcie_ports*]
|
||||
# (optional) The number of PCIe ports an instance will get.
|
||||
# Libvirt allows a custom number of PCIe ports (pcie-root-port controllers) a
|
||||
# target instance will get. Some will be used by default, rest will be available
|
||||
# for hotplug use.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class nova::compute::libvirt (
|
||||
$ensure_package = 'present',
|
||||
$libvirt_virt_type = 'kvm',
|
||||
|
@ -193,6 +200,7 @@ class nova::compute::libvirt (
|
|||
$file_backed_memory = undef,
|
||||
$volume_use_multipath = $::os_service_default,
|
||||
$nfs_mount_options = $::os_service_default,
|
||||
$num_pcie_ports = $::os_service_default,
|
||||
) inherits nova::params {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -277,6 +285,7 @@ class nova::compute::libvirt (
|
|||
'libvirt/file_backed_memory': value => $file_backed_memory;
|
||||
'libvirt/volume_use_multipath': value => $volume_use_multipath;
|
||||
'libvirt/nfs_mount_options': value => $nfs_mount_options;
|
||||
'libvirt/num_pcie_ports': value => $num_pcie_ports;
|
||||
}
|
||||
|
||||
# cpu_model param is only valid if cpu_mode=custom
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Add parameter `num_pcie_ports` to specify the number of PCIe ports an
|
||||
instance will get.
|
||||
Libvirt allows a custom number of PCIe ports (pcie-root-port controllers) a
|
||||
target instance will get. Some will be used by default, rest will be available
|
||||
for hotplug use.
|
|
@ -66,6 +66,7 @@ describe 'nova::compute::libvirt' do
|
|||
it { is_expected.to contain_nova_config('libvirt/tx_queue_size').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/volume_use_multipath').with_value('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/nfs_mount_options').with_ensure('<SERVICE DEFAULT>')}
|
||||
it { is_expected.to contain_nova_config('libvirt/num_pcie_ports').with_ensure('<SERVICE DEFAULT>')}
|
||||
end
|
||||
|
||||
describe 'with params' do
|
||||
|
@ -93,7 +94,8 @@ describe 'nova::compute::libvirt' do
|
|||
:rx_queue_size => 512,
|
||||
:tx_queue_size => 1024,
|
||||
:volume_use_multipath => false,
|
||||
:nfs_mount_options => 'rw,intr,nolock'
|
||||
:nfs_mount_options => 'rw,intr,nolock',
|
||||
:num_pcie_ports => 16
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -121,6 +123,7 @@ describe 'nova::compute::libvirt' do
|
|||
it { is_expected.to contain_nova_config('libvirt/tx_queue_size').with_value(1024)}
|
||||
it { is_expected.to contain_nova_config('libvirt/volume_use_multipath').with_value(false)}
|
||||
it { is_expected.to contain_nova_config('libvirt/nfs_mount_options').with_value('rw,intr,nolock')}
|
||||
it { is_expected.to contain_nova_config('libvirt/num_pcie_ports').with_value(16)}
|
||||
it {
|
||||
is_expected.to contain_service('libvirt').with(
|
||||
:name => 'custom_service',
|
||||
|
|
Loading…
Reference in New Issue