magnum: Add manage_tests_packages

The manage_tests_packages parameter exists in the base tempest class
but the same functionality is not implemented in the separate class
for magnum-tempest-plugin.

Introduce the parameter to the magnum class so that users can disable
package management completely.

Change-Id: Id06fd565371c01d3a6c3bee0366314030d287a5f
(cherry picked from commit 40fcf16ba8)
This commit is contained in:
Takashi Kajinami 2024-04-20 23:25:03 +09:00
parent 8fb6224052
commit 8e72fcdd71
2 changed files with 17 additions and 5 deletions

View File

@ -61,6 +61,10 @@
# (Optional) DNS nameserver to use for ClusterTemplate # (Optional) DNS nameserver to use for ClusterTemplate
# Defaults to '8.8.8.8' # Defaults to '8.8.8.8'
# #
# [*manage_tests_packages*]
# (Optional) Manage the plugin package
# Defaults to true
#
class tempest::magnum ( class tempest::magnum (
Stdlib::Absolutepath $tempest_config_file = '/var/lib/tempest/etc/tempest.conf', Stdlib::Absolutepath $tempest_config_file = '/var/lib/tempest/etc/tempest.conf',
Boolean $provision_image = true, Boolean $provision_image = true,
@ -76,6 +80,7 @@ class tempest::magnum (
$magnum_url = undef, $magnum_url = undef,
$copy_logs = true, $copy_logs = true,
$dns_nameserver = '8.8.8.8', $dns_nameserver = '8.8.8.8',
Boolean $manage_tests_packages = true,
) { ) {
include tempest::params include tempest::params
@ -109,11 +114,13 @@ class tempest::magnum (
} }
} }
if $::tempest::params::python_magnum_tests { if $manage_tests_packages {
package { 'python-magnum-tests': if $::tempest::params::python_magnum_tests {
ensure => present, package { 'python-magnum-tests':
name => $::tempest::params::python_magnum_tests, ensure => present,
tag => ['openstack', 'tempest-package'], name => $::tempest::params::python_magnum_tests,
tag => ['openstack', 'tempest-package'],
}
} }
} }

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``tempest::magnum::manage_tests_packages`` parameter has been
added.