From 94b245f4ca925f67c1aa534ebc2917a054213833 Mon Sep 17 00:00:00 2001 From: Daniel Dehennin Date: Sun, 31 Jan 2021 00:28:12 +0100 Subject: [PATCH 1/2] =?UTF-8?q?test(inspec):=20tumbleweed=20OpenSUSE=20use?= =?UTF-8?q?=20=E2=80=9Cpython38-libvirt-python=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/libraries/libvirt_packages.rb | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/test/integration/share/libraries/libvirt_packages.rb b/test/integration/share/libraries/libvirt_packages.rb index d07bf42..d769f41 100644 --- a/test/integration/share/libraries/libvirt_packages.rb +++ b/test/integration/share/libraries/libvirt_packages.rb @@ -99,14 +99,23 @@ def build_suse_packages { 'libvirt' => ['libvirt-daemon-qemu'], 'extra' => ['libguestfs0'], - 'python' => if inspec.salt_minion.python3? - ['python3-libvirt-python'] - else - ['python2-libvirt-python'] - end + 'python' => build_suse_python_package } end + def build_suse_python_package + case inspec.system.platform[:release] + when 'tumbleweed' + ['python38-libvirt-python'] + else + if inspec.salt_minion.python3? + ['python3-libvirt-python'] + else + ['python2-libvirt-python'] + end + end + end + def build_centos_packages case inspec.system.platform[:release] when /^7/ From b6cc44cf6622cad392d92fcf21609c61d15b1081 Mon Sep 17 00:00:00 2001 From: Daniel Dehennin Date: Sun, 31 Jan 2021 00:28:21 +0100 Subject: [PATCH 2/2] feat(python): define python3 package for OpenSuse Tumbleweed We need a new `map.jinja` source for the grain `oscodename`. --- libvirt/parameters/defaults.yaml | 10 ++++++++++ .../oscodename/openSUSE Tumbleweed.yaml | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 libvirt/parameters/oscodename/openSUSE Tumbleweed.yaml diff --git a/libvirt/parameters/defaults.yaml b/libvirt/parameters/defaults.yaml index 98730f1..3edf8c7 100644 --- a/libvirt/parameters/defaults.yaml +++ b/libvirt/parameters/defaults.yaml @@ -2,6 +2,16 @@ # vim: ft=yaml --- values: + map_jinja: + sources: + - osarch + - os_family + - os + - oscodename + - osfinger + - config_get_lookup + - config_get + - id libvirt_pkg: libvirt qemu_pkg: qemu python2_pkg: libvirt-python diff --git a/libvirt/parameters/oscodename/openSUSE Tumbleweed.yaml b/libvirt/parameters/oscodename/openSUSE Tumbleweed.yaml new file mode 100644 index 0000000..4e7afa4 --- /dev/null +++ b/libvirt/parameters/oscodename/openSUSE Tumbleweed.yaml @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables specific to +# salt['config.get']('oscodename') == openSUSE Tumbleweed. +# You just need to add the key:values for this `oscodename` that differ +# from `defaults.yaml` + `.yaml` + `.yaml` + `.yaml`. +# +# If you do not need to provide defaults via the `oscodename` config, +# you can remove this file or provide at least an empty dict, e.g. +# values: {} +--- +values: + python2_pkg: ~ + python3_pkg: python38-libvirt-python +...