Remove deprecated nova::compute::vgpu
... because it was deprecated during Xena cycle[1].
[1] 84a12d8b37
Change-Id: I388091504e39f64c721da2ac052c7418cc490534
This commit is contained in:
parent
80941110b7
commit
82f108c160
|
@ -357,10 +357,7 @@ class nova::compute (
|
|||
|
||||
include nova::pci
|
||||
include nova::compute::pci
|
||||
|
||||
# TODO(tkajinam): Replace this by nova::compute::mdev when we remove
|
||||
# nova::compute::vgpu
|
||||
include nova::compute::vgpu
|
||||
include nova::compute::mdev
|
||||
|
||||
if ($vnc_enabled and $spice_enabled) {
|
||||
fail('vnc_enabled and spice_enabled is mutually exclusive')
|
||||
|
|
|
@ -24,10 +24,7 @@ class nova::compute::mdev(
|
|||
validate_legacy(Hash, 'validate_hash', $mdev_types_device_addresses_mapping)
|
||||
}
|
||||
|
||||
# TODO(tkajinam): Remove vgpu parameter when we remove nova::compute::vgpu
|
||||
$dev_addr_mapping_real = pick_default(
|
||||
$::nova::compute::vgpu::vgpu_types_device_addresses_mapping,
|
||||
pick_default($mdev_types_device_addresses_mapping, {}))
|
||||
$dev_addr_mapping_real = pick_default($mdev_types_device_addresses_mapping, {})
|
||||
|
||||
if !empty($dev_addr_mapping_real) {
|
||||
nova_config {
|
||||
|
@ -49,10 +46,4 @@ class nova::compute::mdev(
|
|||
'devices/enabled_mdev_types': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
# TODO(tkajinam): Remove this when we remove nova::compute::vgpu
|
||||
nova_config {
|
||||
'devices/enabled_vgpu_types': ensure => absent;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,11 +34,6 @@ define nova::compute::mdev_type (
|
|||
}
|
||||
}
|
||||
|
||||
# TODO(tkajinam): Remove this when we remove nova::compute::vgpu
|
||||
nova_config {
|
||||
"vgpu_${mdev_type}/device_addresses": ensure => absent;
|
||||
}
|
||||
|
||||
nova_config {
|
||||
"mdev_${mdev_type}/mdev_class": value => $mdev_class;
|
||||
}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
# Class nova::compute::vgpu
|
||||
#
|
||||
# DEPRECATED !!
|
||||
# Configures nova compute vgpu options
|
||||
#
|
||||
# === Parameters:
|
||||
#
|
||||
# [*vgpu_types_device_addresses_mapping*]
|
||||
# (optional) Map of vgpu type(s) the instances can get as key and list of
|
||||
# corresponding device addresses as value.
|
||||
# Defaults to undef
|
||||
#
|
||||
class nova::compute::vgpu(
|
||||
$vgpu_types_device_addresses_mapping = undef,
|
||||
) {
|
||||
include nova::deps
|
||||
|
||||
if $vgpu_types_device_addresses_mapping != undef {
|
||||
validate_legacy(Hash, 'validate_hash', $vgpu_types_device_addresses_mapping)
|
||||
}
|
||||
|
||||
if $vgpu_types_device_addresses_mapping != undef or ! defined(Class[nova::compute]) {
|
||||
# NOTE(tkajinam): If the nova::compute class is not yet included then it is
|
||||
# likely this class is included explicitly.
|
||||
warning('The nova::compute::vgpu class is deprecated. Use the nova::compute::mdev class instead')
|
||||
}
|
||||
include nova::compute::mdev
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The ``nova::compute::vgpu`` resource type has been removed. Use
|
||||
the ``nova::compute::mdev`` resource type instead.
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'nova::compute::vgpu' do
|
||||
|
||||
shared_examples_for 'nova-compute-vgpu' do
|
||||
context 'with default parameters' do
|
||||
it 'clears vgpu devices' do
|
||||
is_expected.to contain_nova_config('devices/enabled_mdev_types').with_ensure('absent')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with vgpu types and device addresses mapping' do
|
||||
let :params do
|
||||
{
|
||||
:vgpu_types_device_addresses_mapping => { "nvidia-35" => [] },
|
||||
}
|
||||
end
|
||||
it { is_expected.to contain_nova_config('devices/enabled_mdev_types').with_value('nvidia-35') }
|
||||
it { is_expected.to contain_nova_config('mdev_nvidia-35/device_addresses').with_value('<SERVICE DEFAULT>') }
|
||||
end
|
||||
|
||||
context 'with multiple vgpu types and corresponding device addresses mapping' do
|
||||
let :params do
|
||||
{
|
||||
:vgpu_types_device_addresses_mapping => { "nvidia-35" => ['0000:84:00.0', '0000:85:00.0'],
|
||||
"nvidia-36" => ['0000:86:00.0'] }
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('devices/enabled_mdev_types').with_value('nvidia-35,nvidia-36') }
|
||||
it { is_expected.to contain_nova_config('mdev_nvidia-35/device_addresses').with_value('0000:84:00.0,0000:85:00.0') }
|
||||
it { is_expected.to contain_nova_config('mdev_nvidia-36/device_addresses').with_value('0000:86:00.0') }
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
context "on #{os}" do
|
||||
let (:facts) do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
it_configures 'nova-compute-vgpu'
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue