Skip to content

Commit

Permalink
Merge pull request #83 from baby-gnu/feature/support-opensuse-tumbleweed
Browse files Browse the repository at this point in the history
feat(python): define python3 package for OpenSuse Tumbleweed
  • Loading branch information
myii authored Jan 31, 2021
2 parents da9c242 + b6cc44c commit 62f7348
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
10 changes: 10 additions & 0 deletions libvirt/parameters/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions libvirt/parameters/oscodename/openSUSE Tumbleweed.yaml
Original file line number Diff line number Diff line change
@@ -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` + `<osarch>.yaml` + `<os_family>.yaml` + `<os>.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
...
19 changes: 14 additions & 5 deletions test/integration/share/libraries/libvirt_packages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 62f7348

Please sign in to comment.