diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7df0e6..e04da84 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -150,12 +150,12 @@ default-debian-10-master-py3: {extends: '.test_instance'} # default-debian-9-master-py3: {extends: '.test_instance'} default-ubuntu-2204-master-py3: {extends: '.test_instance_failure_permitted'} default-ubuntu-2004-master-py3: {extends: '.test_instance'} -default-ubuntu-1804-master-py3: {extends: '.test_instance'} +# default-ubuntu-1804-master-py3: {extends: '.test_instance'} default-centos-stream8-master-py3: {extends: '.test_instance_failure_permitted'} default-centos-7-master-py3: {extends: '.test_instance'} -default-fedora-36-master-py3: {extends: '.test_instance_failure_permitted'} -default-fedora-35-master-py3: {extends: '.test_instance'} -default-opensuse-leap-153-master-py3: {extends: '.test_instance'} +# default-fedora-36-master-py3: {extends: '.test_instance_failure_permitted'} +# default-fedora-35-master-py3: {extends: '.test_instance'} +# default-opensuse-leap-153-master-py3: {extends: '.test_instance'} # default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance_failure_permitted'} # default-amazonlinux-2-master-py3: {extends: '.test_instance'} # default-oraclelinux-8-master-py3: {extends: '.test_instance'} @@ -164,37 +164,25 @@ default-opensuse-leap-153-master-py3: {extends: '.test_instance'} # default-gentoo-stage3-latest-master-py3: {extends: '.test_instance'} # default-gentoo-stage3-systemd-master-py3: {extends: '.test_instance'} default-almalinux-8-master-py3: {extends: '.test_instance'} -default-rockylinux-8-master-py3: {extends: '.test_instance'} -# default-debian-11-3004-1-py3: {extends: '.test_instance'} -# default-debian-10-3004-1-py3: {extends: '.test_instance'} -# default-debian-9-3004-1-py3: {extends: '.test_instance'} -# default-ubuntu-2204-3004-1-py3: {extends: '.test_instance_failure_permitted'} -# default-ubuntu-2004-3004-1-py3: {extends: '.test_instance'} -# default-ubuntu-1804-3004-1-py3: {extends: '.test_instance'} -# default-centos-stream8-3004-1-py3: {extends: '.test_instance_failure_permitted'} -# default-centos-7-3004-1-py3: {extends: '.test_instance'} -# default-fedora-36-3004-1-py3: {extends: '.test_instance_failure_permitted'} -# default-fedora-35-3004-1-py3: {extends: '.test_instance'} -# default-amazonlinux-2-3004-1-py3: {extends: '.test_instance'} -# default-oraclelinux-8-3004-1-py3: {extends: '.test_instance'} -# default-oraclelinux-7-3004-1-py3: {extends: '.test_instance'} -# default-arch-base-latest-3004-1-py3: {extends: '.test_instance'} -# default-gentoo-stage3-latest-3004-1-py3: {extends: '.test_instance'} -# default-gentoo-stage3-systemd-3004-1-py3: {extends: '.test_instance'} -# default-almalinux-8-3004-1-py3: {extends: '.test_instance'} -# default-rockylinux-8-3004-1-py3: {extends: '.test_instance'} -# default-opensuse-leap-153-3004-0-py3: {extends: '.test_instance'} -# default-opensuse-tmbl-latest-3004-0-py3: {extends: '.test_instance_failure_permitted'} -# default-debian-10-3003-4-py3: {extends: '.test_instance'} -# default-debian-9-3003-4-py3: {extends: '.test_instance'} -# default-ubuntu-2004-3003-4-py3: {extends: '.test_instance'} -# default-ubuntu-1804-3003-4-py3: {extends: '.test_instance'} -# default-centos-stream8-3003-4-py3: {extends: '.test_instance_failure_permitted'} -# default-centos-7-3003-4-py3: {extends: '.test_instance'} -# default-amazonlinux-2-3003-4-py3: {extends: '.test_instance'} -# default-oraclelinux-8-3003-4-py3: {extends: '.test_instance'} -# default-oraclelinux-7-3003-4-py3: {extends: '.test_instance'} -# default-almalinux-8-3003-4-py3: {extends: '.test_instance'} +# default-rockylinux-8-master-py3: {extends: '.test_instance'} +default-debian-11-3006-5-py3: {extends: '.test_instance'} +default-debian-10-3006-5-py3: {extends: '.test_instance'} +# default-debian-9-3006-5-py3: {extends: '.test_instance'} +default-ubuntu-2204-3006-5-py3: {extends: '.test_instance_failure_permitted'} +default-ubuntu-2004-3006-5-py3: {extends: '.test_instance'} +# default-ubuntu-1804-3006-5-py3: {extends: '.test_instance'} +default-centos-stream8-3006-5-py3: {extends: '.test_instance_failure_permitted'} +default-centos-7-3006-5-py3: {extends: '.test_instance'} +# default-fedora-36-3006-5-py3: {extends: '.test_instance_failure_permitted'} +# default-fedora-35-3006-5-py3: {extends: '.test_instance'} +# default-amazonlinux-2-3006-5-py3: {extends: '.test_instance'} +# default-oraclelinux-8-3006-5-py3: {extends: '.test_instance'} +# default-oraclelinux-7-3006-5-py3: {extends: '.test_instance'} +# default-arch-base-latest-3006-5-py3: {extends: '.test_instance'} +# default-gentoo-stage3-latest-3006-5-py3: {extends: '.test_instance'} +# default-gentoo-stage3-systemd-3006-5-py3: {extends: '.test_instance'} +default-almalinux-8-3006-5-py3: {extends: '.test_instance'} +# default-rockylinux-8-3006-5-py3: {extends: '.test_instance'} # yamllint enable rule:line-length ############################################################################### diff --git a/.travis.yml b/.travis.yml index cf42bb5..bb0ad0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,15 +99,15 @@ jobs: # - env: INSTANCE=default-debian-11-master-py3 - env: INSTANCE=default-debian-10-master-py3 # - env: INSTANCE=clean-debian-10-master-py3 - - env: INSTANCE=default-debian-9-master-py3 + # - env: INSTANCE=default-debian-9-master-py3 - env: INSTANCE=default-ubuntu-2204-master-py3 - env: INSTANCE=default-ubuntu-2004-master-py3 - - env: INSTANCE=default-ubuntu-1804-master-py3 + # - env: INSTANCE=default-ubuntu-1804-master-py3 - env: INSTANCE=default-centos-stream8-master-py3 - env: INSTANCE=default-centos-7-master-py3 - - env: INSTANCE=default-fedora-36-master-py3 - - env: INSTANCE=default-fedora-35-master-py3 - - env: INSTANCE=default-opensuse-leap-153-master-py3 + # - env: INSTANCE=default-fedora-36-master-py3 + # - env: INSTANCE=default-fedora-35-master-py3 + # - env: INSTANCE=default-opensuse-leap-153-master-py3 # - env: INSTANCE=default-opensuse-tmbl-latest-master-py3 # - env: INSTANCE=default-amazonlinux-2-master-py3 # - env: INSTANCE=default-oraclelinux-8-master-py3 @@ -116,37 +116,7 @@ jobs: # - env: INSTANCE=default-gentoo-stage3-latest-master-py3 # - env: INSTANCE=default-gentoo-stage3-systemd-master-py3 - env: INSTANCE=default-almalinux-8-master-py3 - - env: INSTANCE=default-rockylinux-8-master-py3 - # - env: INSTANCE=default-debian-11-3004-1-py3 - # - env: INSTANCE=default-debian-10-3004-1-py3 - # - env: INSTANCE=default-debian-9-3004-1-py3 - # - env: INSTANCE=default-ubuntu-2204-3004-1-py3 - # - env: INSTANCE=default-ubuntu-2004-3004-1-py3 - # - env: INSTANCE=default-ubuntu-1804-3004-1-py3 - # - env: INSTANCE=default-centos-stream8-3004-1-py3 - # - env: INSTANCE=default-centos-7-3004-1-py3 - # - env: INSTANCE=default-fedora-36-3004-1-py3 - # - env: INSTANCE=default-fedora-35-3004-1-py3 - # - env: INSTANCE=default-amazonlinux-2-3004-1-py3 - # - env: INSTANCE=default-oraclelinux-8-3004-1-py3 - # - env: INSTANCE=default-oraclelinux-7-3004-1-py3 - # - env: INSTANCE=default-arch-base-latest-3004-1-py3 - # - env: INSTANCE=default-gentoo-stage3-latest-3004-1-py3 - # - env: INSTANCE=default-gentoo-stage3-systemd-3004-1-py3 - # - env: INSTANCE=default-almalinux-8-3004-1-py3 - # - env: INSTANCE=default-rockylinux-8-3004-1-py3 - # - env: INSTANCE=default-opensuse-leap-153-3004-0-py3 - # - env: INSTANCE=default-opensuse-tmbl-latest-3004-0-py3 - # - env: INSTANCE=default-debian-10-3003-4-py3 - # - env: INSTANCE=default-debian-9-3003-4-py3 - # - env: INSTANCE=default-ubuntu-2004-3003-4-py3 - # - env: INSTANCE=default-ubuntu-1804-3003-4-py3 - # - env: INSTANCE=default-centos-stream8-3003-4-py3 - # - env: INSTANCE=default-centos-7-3003-4-py3 - # - env: INSTANCE=default-amazonlinux-2-3003-4-py3 - # - env: INSTANCE=default-oraclelinux-8-3003-4-py3 - # - env: INSTANCE=default-oraclelinux-7-3003-4-py3 - # - env: INSTANCE=default-almalinux-8-3003-4-py3 + # - env: INSTANCE=default-rockylinux-8-master-py3 ## Define the release stage that runs `semantic-release` - stage: 'release' diff --git a/kitchen.yml b/kitchen.yml index 212a506..d606daf 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -28,10 +28,6 @@ platforms: driver: image: saltimages/salt-tiamat-py3:debian-10 run_command: /lib/systemd/systemd - - name: debian-9-tiamat-py3 - driver: - image: saltimages/salt-tiamat-py3:debian-9 - run_command: /lib/systemd/systemd - name: ubuntu-2204-tiamat-py3 driver: image: saltimages/salt-tiamat-py3:ubuntu-22.04 @@ -40,10 +36,6 @@ platforms: driver: image: saltimages/salt-tiamat-py3:ubuntu-20.04 run_command: /lib/systemd/systemd - - name: ubuntu-1804-tiamat-py3 - driver: - image: saltimages/salt-tiamat-py3:ubuntu-18.04 - run_command: /lib/systemd/systemd - name: centos-stream8-tiamat-py3 driver: image: saltimages/salt-tiamat-py3:centos-stream8 @@ -75,10 +67,6 @@ platforms: driver: image: saltimages/salt-master-py3:debian-10 run_command: /lib/systemd/systemd - - name: debian-9-master-py3 - driver: - image: saltimages/salt-master-py3:debian-9 - run_command: /lib/systemd/systemd - name: ubuntu-2204-master-py3 driver: image: saltimages/salt-master-py3:ubuntu-22.04 @@ -87,36 +75,12 @@ platforms: driver: image: saltimages/salt-master-py3:ubuntu-20.04 run_command: /lib/systemd/systemd - - name: ubuntu-1804-master-py3 - driver: - image: saltimages/salt-master-py3:ubuntu-18.04 - run_command: /lib/systemd/systemd - name: centos-stream8-master-py3 driver: image: saltimages/salt-master-py3:centos-stream8 - name: centos-7-master-py3 driver: image: saltimages/salt-master-py3:centos-7 - - name: fedora-36-master-py3 - driver: - image: saltimages/salt-master-py3:fedora-36 - - name: fedora-35-master-py3 - driver: - image: saltimages/salt-master-py3:fedora-35 - - name: opensuse-leap-153-master-py3 - driver: - image: saltimages/salt-master-py3:opensuse-leap-15.3 - # Workaround to avoid intermittent failures on `opensuse-leap-15.3`: - # => SCP did not finish successfully (255): (Net::SCP::Error) - transport: - max_ssh_sessions: 1 - - name: opensuse-tmbl-latest-master-py3 - driver: - image: saltimages/salt-master-py3:opensuse-tumbleweed-latest - # Workaround to avoid intermittent failures on `opensuse-tumbleweed`: - # => SCP did not finish successfully (255): (Net::SCP::Error) - transport: - max_ssh_sessions: 1 - name: amazonlinux-2-master-py3 driver: image: saltimages/salt-master-py3:amazonlinux-2 @@ -129,134 +93,72 @@ platforms: - name: arch-base-latest-master-py3 driver: image: saltimages/salt-master-py3:arch-base-latest - - name: gentoo-stage3-latest-master-py3 - driver: - image: saltimages/salt-master-py3:gentoo-stage3-latest - run_command: /sbin/init - - name: gentoo-stage3-systemd-master-py3 - driver: - image: saltimages/salt-master-py3:gentoo-stage3-systemd - name: almalinux-8-master-py3 driver: image: saltimages/salt-master-py3:almalinux-8 - - name: rockylinux-8-master-py3 - driver: - image: saltimages/salt-master-py3:rockylinux-8 - ## SALT `3004.1` - - name: debian-11-3004-1-py3 + ## SALT `3006.5` + - name: debian-11-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:debian-11 + image: saltimages/salt-3006.5-py3:debian-11 run_command: /lib/systemd/systemd - - name: debian-10-3004-1-py3 + - name: debian-10-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:debian-10 + image: saltimages/salt-3006.5-py3:debian-10 run_command: /lib/systemd/systemd - - name: debian-9-3004-1-py3 + - name: debian-9-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:debian-9 + image: saltimages/salt-3006.5-py3:debian-9 run_command: /lib/systemd/systemd - - name: ubuntu-2204-3004-1-py3 + - name: ubuntu-2204-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:ubuntu-22.04 + image: saltimages/salt-3006.5-py3:ubuntu-22.04 run_command: /lib/systemd/systemd - - name: ubuntu-2004-3004-1-py3 + - name: ubuntu-2004-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:ubuntu-20.04 + image: saltimages/salt-3006.5-py3:ubuntu-20.04 run_command: /lib/systemd/systemd - - name: ubuntu-1804-3004-1-py3 + - name: ubuntu-1804-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:ubuntu-18.04 + image: saltimages/salt-3006.5-py3:ubuntu-18.04 run_command: /lib/systemd/systemd - - name: centos-stream8-3004-1-py3 + - name: centos-stream8-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:centos-stream8 - - name: centos-7-3004-1-py3 + image: saltimages/salt-3006.5-py3:centos-stream8 + - name: centos-7-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:centos-7 - - name: fedora-36-3004-1-py3 + image: saltimages/salt-3006.5-py3:centos-7 + - name: fedora-36-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:fedora-36 - - name: fedora-35-3004-1-py3 + image: saltimages/salt-3006.5-py3:fedora-36 + - name: fedora-35-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:fedora-35 - - name: amazonlinux-2-3004-1-py3 + image: saltimages/salt-3006.5-py3:fedora-35 + - name: amazonlinux-2-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:amazonlinux-2 - - name: oraclelinux-8-3004-1-py3 + image: saltimages/salt-3006.5-py3:amazonlinux-2 + - name: oraclelinux-8-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:oraclelinux-8 - - name: oraclelinux-7-3004-1-py3 + image: saltimages/salt-3006.5-py3:oraclelinux-8 + - name: oraclelinux-7-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:oraclelinux-7 - - name: arch-base-latest-3004-1-py3 + image: saltimages/salt-3006.5-py3:oraclelinux-7 + - name: arch-base-latest-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:arch-base-latest - - name: gentoo-stage3-latest-3004-1-py3 + image: saltimages/salt-3006.5-py3:arch-base-latest + - name: gentoo-stage3-latest-3006-5-py3 driver: - image: saltimages/salt-3004.1-py3:gentoo-stage3-latest + image: saltimages/salt-3006.5-py3:gentoo-stage3-latest run_command: /sbin/init - - name: gentoo-stage3-systemd-3004-1-py3 - driver: - image: saltimages/salt-3004.1-py3:gentoo-stage3-systemd - - name: almalinux-8-3004-1-py3 - driver: - image: saltimages/salt-3004.1-py3:almalinux-8 - - name: rockylinux-8-3004-1-py3 - driver: - image: saltimages/salt-3004.1-py3:rockylinux-8 - - ## SALT `3004.0` - - name: opensuse-leap-153-3004-0-py3 - driver: - image: saltimages/salt-3004.0-py3:opensuse-leap-15.3 - # Workaround to avoid intermittent failures on `opensuse-leap-15.3`: - # => SCP did not finish successfully (255): (Net::SCP::Error) - transport: - max_ssh_sessions: 1 - - name: opensuse-tmbl-latest-3004-0-py3 - driver: - image: saltimages/salt-3004.0-py3:opensuse-tumbleweed-latest - # Workaround to avoid intermittent failures on `opensuse-tumbleweed`: - # => SCP did not finish successfully (255): (Net::SCP::Error) - transport: - max_ssh_sessions: 1 - - ## SALT `3003.4` - - name: debian-10-3003-4-py3 - driver: - image: saltimages/salt-3003.4-py3:debian-10 - run_command: /lib/systemd/systemd - - name: debian-9-3003-4-py3 - driver: - image: saltimages/salt-3003.4-py3:debian-9 - run_command: /lib/systemd/systemd - - name: ubuntu-2004-3003-4-py3 - driver: - image: saltimages/salt-3003.4-py3:ubuntu-20.04 - run_command: /lib/systemd/systemd - - name: ubuntu-1804-3003-4-py3 - driver: - image: saltimages/salt-3003.4-py3:ubuntu-18.04 - run_command: /lib/systemd/systemd - - name: centos-stream8-3003-4-py3 - driver: - image: saltimages/salt-3003.4-py3:centos-stream8 - - name: centos-7-3003-4-py3 - driver: - image: saltimages/salt-3003.4-py3:centos-7 - - name: amazonlinux-2-3003-4-py3 - driver: - image: saltimages/salt-3003.4-py3:amazonlinux-2 - - name: oraclelinux-8-3003-4-py3 + - name: gentoo-stage3-systemd-3006-5-py3 driver: - image: saltimages/salt-3003.4-py3:oraclelinux-8 - - name: oraclelinux-7-3003-4-py3 + image: saltimages/salt-3006.5-py3:gentoo-stage3-systemd + - name: almalinux-8-3006-5-py3 driver: - image: saltimages/salt-3003.4-py3:oraclelinux-7 - - name: almalinux-8-3003-4-py3 + image: saltimages/salt-3006.5-py3:almalinux-8 + - name: rockylinux-8-3006-5-py3 driver: - image: saltimages/salt-3003.4-py3:almalinux-8 + image: saltimages/salt-3006.5-py3:rockylinux-8 verifier: # https://www.inspec.io/ diff --git a/libvirt/parameters/defaults.yaml b/libvirt/parameters/defaults.yaml index 265d448..70ddd9f 100644 --- a/libvirt/parameters/defaults.yaml +++ b/libvirt/parameters/defaults.yaml @@ -14,8 +14,7 @@ values: - id libvirt_pkg: libvirt qemu_pkg: qemu - python2_pkg: libvirt-python - python3_pkg: python3-libvirt + pip_pkg: libvirt-python libvirt_service: libvirtd libvirtd_config: /etc/libvirt/libvirtd.conf daemon_config_path: {} diff --git a/libvirt/parameters/os/AlmaLinux.yaml b/libvirt/parameters/os/AlmaLinux.yaml index 932cb1c..a2bac70 100644 --- a/libvirt/parameters/os/AlmaLinux.yaml +++ b/libvirt/parameters/os/AlmaLinux.yaml @@ -10,5 +10,11 @@ # values: {} --- values: - python2_pkg: ~ + qemu_pkg: qemu-kvm + extra_pkgs: + - python3-devel + - libguestfs + - libvirt-devel + - pkgconf + daemon_config_path: /etc/sysconfig ... diff --git a/libvirt/parameters/os/CentOS.yaml b/libvirt/parameters/os/CentOS.yaml index 932cb1c..053c074 100644 --- a/libvirt/parameters/os/CentOS.yaml +++ b/libvirt/parameters/os/CentOS.yaml @@ -10,5 +10,11 @@ # values: {} --- values: - python2_pkg: ~ + qemu_pkg: qemu-kvm + extra_pkgs: + - python3-devel + - libguestfs + - libvirt-devel + - pkgconfig + daemon_config_path: /etc/sysconfig ... diff --git a/libvirt/parameters/os/Fedora.yaml b/libvirt/parameters/os/Fedora.yaml deleted file mode 100644 index 77b0c73..0000000 --- a/libvirt/parameters/os/Fedora.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# vim: ft=yaml -# -# Setup variables specific to salt['config.get']('os') == Fedora. -# You just need to add the key:values for this `os` that differ -# from `defaults.yaml` + `.yaml` + `.yaml`. -# -# If you do not need to provide defaults via the `os` config, -# you can remove this file or provide at least an empty dict, e.g. -# values: {} ---- -values: - python2_pkg: python2-libvirt -... diff --git a/libvirt/parameters/os/Rocky.yaml b/libvirt/parameters/os/Rocky.yaml deleted file mode 100644 index 932cb1c..0000000 --- a/libvirt/parameters/os/Rocky.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# vim: ft=yaml -# -# Setup variables specific to salt['config.get']('os') == CentOS. -# You just need to add the key:values for this `os` that differ -# from `defaults.yaml` + `.yaml` + `.yaml`. -# -# If you do not need to provide defaults via the `os` config, -# you can remove this file or provide at least an empty dict, e.g. -# values: {} ---- -values: - python2_pkg: ~ -... diff --git a/libvirt/parameters/os_family/Arch.yaml b/libvirt/parameters/os_family/Arch.yaml index 36427f2..96bab23 100644 --- a/libvirt/parameters/os_family/Arch.yaml +++ b/libvirt/parameters/os_family/Arch.yaml @@ -12,5 +12,7 @@ values: daemon_config_path: /etc/conf.d qemu_pkg: qemu-full - python3_pkg: libvirt-python + extra_pkgs: + - python3-dev + - pkgconf ... diff --git a/libvirt/parameters/os_family/Debian.yaml b/libvirt/parameters/os_family/Debian.yaml index bcfa828..5fbfa01 100644 --- a/libvirt/parameters/os_family/Debian.yaml +++ b/libvirt/parameters/os_family/Debian.yaml @@ -13,10 +13,14 @@ values: libvirt_pkg: libvirt-daemon-system libvirt_service: libvirtd qemu_pkg: qemu-system-x86 - python2_pkg: python-libvirt extra_pkgs: + - python3-dev + - build-essential + - gcc - libguestfs0 - libguestfs-tools - gnutls-bin + - libvirt-dev + - pkg-config daemon_config_path: /etc/default ... diff --git a/libvirt/parameters/os_family/RedHat.yaml b/libvirt/parameters/os_family/RedHat.yaml index 7b09659..fb3c616 100644 --- a/libvirt/parameters/os_family/RedHat.yaml +++ b/libvirt/parameters/os_family/RedHat.yaml @@ -12,6 +12,9 @@ values: qemu_pkg: qemu-kvm extra_pkgs: + - python3-devel - libguestfs + - libvirt-devel + - pkgconf daemon_config_path: /etc/sysconfig ... diff --git a/libvirt/parameters/os_family/Suse.yaml b/libvirt/parameters/os_family/Suse.yaml index bfc3fdb..e182c1e 100644 --- a/libvirt/parameters/os_family/Suse.yaml +++ b/libvirt/parameters/os_family/Suse.yaml @@ -13,8 +13,9 @@ values: libvirt_pkg: libvirt-daemon-qemu qemu_pkg: qemu-kvm extra_pkgs: + - python3-dev - libguestfs0 - python2_pkg: python2-libvirt-python - python3_pkg: python3-libvirt-python + - libvirt-devel + - pkg-config daemon_config_path: /etc/sysconfig ... diff --git a/libvirt/parameters/oscodename/openSUSE Tumbleweed.yaml b/libvirt/parameters/oscodename/openSUSE Tumbleweed.yaml deleted file mode 100644 index 4e7afa4..0000000 --- a/libvirt/parameters/oscodename/openSUSE Tumbleweed.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# -*- 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 -... diff --git a/libvirt/parameters/osfinger/CentOS Linux-7.yaml b/libvirt/parameters/osfinger/CentOS Linux-7.yaml deleted file mode 100644 index 89d508d..0000000 --- a/libvirt/parameters/osfinger/CentOS Linux-7.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -# vim: ft=yaml -# -# Setup variables specific to salt['config.get']('osfinger') == CentOS Linux-7. -# You just need to add the key:values for this `osfinger` that differ -# from `defaults.yaml`. -# -# If you do not need to provide defaults via the `osfinger` config, -# you can remove this file or provide at least an empty dict, e.g. -# values: {} ---- -values: - python2_pkg: libvirt-python - python3_pkg: ~ -... diff --git a/libvirt/python.jinja b/libvirt/python.jinja deleted file mode 100644 index db9c1b4..0000000 --- a/libvirt/python.jinja +++ /dev/null @@ -1,34 +0,0 @@ -{%- macro switch_python32(python3, python2) %} - {#- - Returns arguments depending on the Python environment of the - SaltStack minion. - - A `none` argument is returned as an empty string `''`. - - Params: - * python3: the parameter to return in case of a Python3 minion. - * python2: the parameter to return in case of a Python2 minion. - - Example: - - {%- set package = switch_python32('python3-library', 'python2-library') %} - {%- if package %} - pkg-install-{{ package }}: - pkg.installed: - - name: {{ package }} - {%- endif %} - - The `package` will be `python3-library` when the SaltStack minion - runs under Python3 or `python2-library` otherwise. - #} - {%- if salt['grains.get']('pythonversion')[0] == 3 %} - {%- set selected = python3 %} - {%- else %} - {%- set selected = python2 %} - {%- endif %} - {#- Coerce null value to empty string to make tests simpler #} - {%- if not selected or selected is none -%} - {%- else -%} - {{ selected }} - {%- endif -%} -{%- endmacro -%} diff --git a/libvirt/python/clean.sls b/libvirt/python/clean.sls index 637b9f9..a409751 100644 --- a/libvirt/python/clean.sls +++ b/libvirt/python/clean.sls @@ -4,13 +4,7 @@ {#- Get the `tplroot` from `tpldir` #} {%- set tplroot = tpldir.split('/')[0] %} {%- from tplroot ~ "/map.jinja" import mapdata as libvirt_settings with context %} -{%- from tplroot ~ "/python.jinja" import switch_python32 with context %} -{%- set package = switch_python32(libvirt_settings.python3_pkg, libvirt_settings.python2_pkg) %} - -{#- Some OS do not have the python3 library #} -{%- if package %} libvirt-python-clean-pkg-removed: - pkg.removed: - - name: {{ package }} -{%- endif %} + pip.uninstalled: + - name: {{ libvirt_settings.pip_pkg }} diff --git a/libvirt/python/install.sls b/libvirt/python/install.sls index d2927b7..2d0a329 100644 --- a/libvirt/python/install.sls +++ b/libvirt/python/install.sls @@ -4,13 +4,10 @@ {#- Get the `tplroot` from `tpldir` #} {%- set tplroot = tpldir.split('/')[0] %} {%- from tplroot ~ "/map.jinja" import mapdata as libvirt_settings with context %} -{%- from tplroot ~ "/python.jinja" import switch_python32 with context %} -{%- set package = switch_python32(libvirt_settings.python3_pkg, libvirt_settings.python2_pkg) %} - -{#- Some OS do not have the python3 library #} -{%- if package %} libvirt-python-install-pkg-installed: - pkg.installed: - - name: {{ package }} -{%- endif %} + pip.installed: + - name: {{ libvirt_settings.pip_pkg }} + - require: + - pkg: libvirt-extra-install-pkg-installed + diff --git a/libvirt/server/tls/certs.sls b/libvirt/server/tls/certs.sls index f60cd06..f4bf363 100644 --- a/libvirt/server/tls/certs.sls +++ b/libvirt/server/tls/certs.sls @@ -6,26 +6,16 @@ {%- set sls_python = tplroot ~ '.python' %} {%- set sls_server_config = tplroot ~ '.server.config' %} {%- from tplroot ~ "/map.jinja" import mapdata as libvirt_settings with context %} -{%- from tplroot ~ "/python.jinja" import switch_python32 with context %} -{%- set package = switch_python32(libvirt_settings.python3_pkg, libvirt_settings.python2_pkg) %} {%- set salt_version = salt['grains.get']('saltversioninfo', '') %} -{#- Some OS do not have the python3 library #} -{%- if package %} include: - {{ sls_python }} - {{ sls_server_config }} libvirt-server-tls-certs-virt-keys: -# API changes with version 2016.3.0 -{%- if salt_version[0]|int < 2016 or (salt_version[0]|int == 2016 and salt_version[1]|int <= 3) %} - libvirt.keys: -{%- else %} virt.keys: -{%- endif %} - name: libvirt_keys - require: - pkg: libvirt-server-package-install-pkg-installed - - pkg: libvirt-python-install-pkg-installed -{%- endif %} + - pip: {{ libvirt_settings.pip_pkg }} diff --git a/test/integration/share/libraries/libvirt_packages.rb b/test/integration/share/libraries/libvirt_packages.rb index 879f107..17b292c 100644 --- a/test/integration/share/libraries/libvirt_packages.rb +++ b/test/integration/share/libraries/libvirt_packages.rb @@ -4,7 +4,6 @@ # Author: Daniel Dehennin # Copyright (C) 2019 Pole de Competences Logiciels Libres -# rubocop:disable Metrics/ClassLength class LibvirtPackagesResource < Inspec.resource(1) name 'libvirt_packages' @@ -28,7 +27,6 @@ def build_packages packages = build_default_packages packages.merge!(build_os_family_packages) - packages.merge!(build_os_name_packages) end def build_os_family_packages @@ -48,30 +46,11 @@ def build_os_family_packages end end - def build_os_name_packages - # osfamily.yaml / osmap.yaml - case inspec.system.platform[:name] - when 'centos', 'almalinux', 'rockylinux' - build_centos_packages - - when 'ubuntu' - build_ubuntu_packages - - else - {} - end - end - def build_default_packages { 'libvirt' => ['libvirt'], 'qemu' => ['qemu-kvm'], - 'extra' => ['libguestfs'], - 'python' => if inspec.salt_minion.python3? - ['libvirt-python3'] - else - ['libvirt-python'] - end + 'extra' => ['libguestfs'] } end @@ -79,67 +58,14 @@ def build_debian_packages { 'libvirt' => ['libvirt-daemon-system'], 'qemu' => ['qemu-system-x86'], - 'extra' => %w[libguestfs0 libguestfs-tools gnutls-bin], - 'python' => if inspec.salt_minion.python3? - ['python3-libvirt'] - else - ['python-libvirt'] - end - } - end - - def build_fedora_packages - { - 'python' => if inspec.salt_minion.python3? - ['python3-libvirt'] - else - ['python2-libvirt'] - end + 'extra' => %w[libguestfs0 libguestfs-tools gnutls-bin] } end def build_suse_packages { 'libvirt' => ['libvirt-daemon-qemu'], - 'extra' => ['libguestfs0'], - 'python' => build_suse_python_package + 'extra' => ['libguestfs0'] } 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/ - if inspec.salt_minion.python3? - { 'python' => [] } - else - { 'python' => ['libvirt-python'] } - end - else - # Only python3 since CentOS 8 - { 'python' => ['python3-libvirt'] } - end - end - - def build_ubuntu_packages - case inspec.system.platform[:release] - when /^16/ - { 'libvirt' => ['libvirt-bin'] } - else - {} - end - end end -# rubocop:enable Metrics/ClassLength