# # spec file for package virtual-host-gatherer # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %global with_susecloud 0 %define skip_python2 1 %global __python /usr/bin/python3 %{?!python_module:%define python_module() python3-%{**}} %{?!python_build:%define python_build %{expand:%py3_build}} %{?!python_install:%define python_install %{expand:%py3_install}} Name: virtual-host-gatherer Version: 1.0.26 Release: 220400.1.1.uyuni2 Summary: Gather virtualization information License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/uyuni-project/virtual-host-gatherer Source0: virtual-host-gatherer-git-0.f8f10eb.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: asciidoc BuildRequires: python-rpm-macros %if 0%{?rhel} BuildRequires: libxslt-devel %else BuildRequires: libxslt-tools %endif BuildRequires: %{python_module devel} BuildRequires: %{python_module pycurl} BuildRequires: %{python_module six} Requires: %{python_module pycurl} Requires: %{python_module six} BuildArch: noarch %description This package contains a script to gather information about virtual system running on different kind of hypervisors. %package VMware Summary: VMware connection module Group: Development/Languages Requires: %{name} = %{version} Requires: %{python_module pyvmomi} %description VMware VMware connection module for gatherer %if 0%{with_susecloud} %package SUSECloud Summary: SUSE Cloud connection module Group: Development/Languages Requires: %{name} = %{version} Requires: %{python_module novaclient} %description SUSECloud SUSE Cloud connection module for gatherer %endif %package Kubernetes Summary: Kubernetes connection module Group: Development/Languages Requires: %{name} = %{version} Requires: %{python_module kubernetes} %description Kubernetes Kubernetes connection module for gatherer %package libcloud Summary: Azure, Amazon AWS EC2 and Google Compute connection module Group: Development/Languages Requires: %{name} = %{version} Requires: %{python_module apache-libcloud} %description libcloud Azure, Amazon AWS EC2 and Google Compute Engine connection module %package Nutanix Summary: Nutanix AHV connection module Group: Development/Languages Requires: %{name} = %{version} %description Nutanix Nutanix AHV connection module for gatherer %package Libvirt Summary: Libvirt connection module Group: Development/Languages Requires: %{name} = %{version} Requires: %{python_module libvirt-python} %description Libvirt Libvirt connection module for gatherer %prep %setup -q -n virtual-host-gatherer-git-0.f8f10eb %build %python_build %install %python_install %if ! 0%{with_susecloud} rm -f $RPM_BUILD_ROOT%{python_sitelib}/gatherer/modules/SUSECloud.py* rm -f $RPM_BUILD_ROOT%{python_sitelib}/gatherer/modules/__pycache__/SUSECloud.* %endif a2x -v -d manpage -f manpage doc/%{name}.1.asciidoc mkdir -p %{buildroot}%{_mandir}/man1 install -m 0644 doc/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/ %check export PYTHONPATH=%{buildroot}%{python_sitelib} %{buildroot}%{_bindir}/%{name} -h %{buildroot}%{_bindir}/%{name} -l %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %license LICENSE %doc README.md %doc %{_mandir}/man1/%{name}.1* %dir %{python_sitelib}/gatherer %dir %{python_sitelib}/gatherer/modules %{_bindir}/%{name} %{python_sitelib}/gatherer/*.py* %{python_sitelib}/gatherer/modules/__init__.py* %{python_sitelib}/virtual_host_gatherer-*.egg-info %{python_sitelib}/gatherer/modules/File.py* %dir %{python_sitelib}/gatherer/__pycache__ %dir %{python_sitelib}/gatherer/modules/__pycache__ %{python_sitelib}/gatherer/__pycache__/* %{python_sitelib}/gatherer/modules/__pycache__/File.* %{python_sitelib}/gatherer/modules/__pycache__/__init__.* %files VMware %defattr(-,root,root,-) %{python_sitelib}/gatherer/modules/VMware.py* %{python_sitelib}/gatherer/modules/__pycache__/VMware.* %if 0%{with_susecloud} %files SUSECloud %defattr(-,root,root,-) %{python_sitelib}/gatherer/modules/SUSECloud.py* %{python_sitelib}/gatherer/modules/__pycache__/SUSECloud.* %endif %files Kubernetes %defattr(-,root,root,-) %{python_sitelib}/gatherer/modules/Kubernetes.py* %{python_sitelib}/gatherer/modules/__pycache__/Kubernetes.* %files libcloud %defattr(-,root,root,-) %{python_sitelib}/gatherer/modules/Azure.py* %{python_sitelib}/gatherer/modules/GoogleCE.py* %{python_sitelib}/gatherer/modules/AmazonEC2.py* %{python_sitelib}/gatherer/modules/__pycache__/Azure.* %{python_sitelib}/gatherer/modules/__pycache__/GoogleCE.* %{python_sitelib}/gatherer/modules/__pycache__/AmazonEC2.* %files Nutanix %defattr(-,root,root,-) %{python_sitelib}/gatherer/modules/NutanixAHV.py* %{python_sitelib}/gatherer/modules/__pycache__/NutanixAHV.* %files Libvirt %defattr(-,root,root,-) %{python_sitelib}/gatherer/modules/Libvirt.py* %{python_sitelib}/gatherer/modules/__pycache__/Libvirt.* %changelog * Wed Apr 19 2023 mc@suse.de - version 1.0.26-1 * fix cpu calculation in the libvirt module and enhance the data structure by os value * Sat Feb 11 2023 mc@suse.de - version 1.0.25-1 * Report total CPU numbers in the libvirt module * Mon Nov 14 2022 Alexander Graul - version 1.0.24-1 * Report total memory of a libvirt hypervisor * Improve interoperability with other Python projects * Mon Jun 6 2022 Julio González Gil - Declare the LICENSE file as license and not doc * Fri Mar 25 2022 mc@suse.de - version 1.0.23-1 * reformat the first 3 groups of the UUID for hardware versions >=13 in VMWare environment. * Fix shebangs to use python3 * Implement libvirt module * Sat Dec 5 2020 mc@suse.de - version 1.0.22-1 - Modified to build on RHEL. * Mon Aug 10 2020 psuarezhernandez@suse.com - version 1.0.21-1 - Add new gatherer module for Nutanix AHV. * Fri Apr 24 2020 Michael Calmer - use %%py_requires macro only for python2 to fix build with python3 only * Thu Apr 2 2020 psuarezhernandez@suse.com - version 1.0.20-1 - Cast to NodeState to str to allow serialization on libcloud 2.8.1 (bsc#1167052) * Fri Sep 20 2019 psuarezhernandez@suse.com - version 1.0.19-1 - Add new modules to deal with Amazon EC2, Azure and Google Compute * Thu Jan 3 2019 mc@suse.de - version 1.0.18-1 - Make virtual-host-gather Python 2/3 compatible * Mon Feb 26 2018 mc@suse.de - version 1.0.17-1 - Support kubernetes access configuration only via kubeconfig. Remove other configuration options like url, username, password and certificates. * Fri Dec 22 2017 psuarezhernandez@suse.com - version 1.0.16-1 - Add VM state as info gathered from VMware (bsc#1063759) - Explore the entire tree of nodes from VMware (bsc#1070597) * Tue Nov 7 2017 psuarezhernandez@suse.com - version 1.0.15-1 - Skip safely VMs which have no config attribute on VMware (bsc#1066923) * Tue Aug 22 2017 mc@suse.de - version 1.0.14-1 - Params to configure Kuberntes module from kubeconfig - implement kubernetes gatherer module * Wed Mar 1 2017 psuarezhernandez@suse.com - version 1.0.13-1 - Adding support for exploring 'vim.Folder' (bsc#1025421) * Wed Oct 19 2016 mc@suse.de - version 1.0.12-1 - log input and output in debug mode - improve error logging in VMware module * Thu Dec 10 2015 mc@suse.de - version 1.0.11-1 - rename parameter in the README and manpage - catch exception and write error message in the log * Fri Nov 20 2015 mc@suse.de - version 1.0.10-1 - change module keys to better names - sort output of list modules - file module should be able to handle gatherer output as input * Wed Oct 28 2015 mc@suse.de - version 1.0.9-1 - introduce hostIdentifier in the gatherer output * Mon Oct 5 2015 mc@suse.de - version 1.0.8-1 - add manpage for virtual-host-gatherer * Mon Oct 5 2015 mc@suse.de - version 1.0.7-1 - rename python-gatherer into virtual-host-gatherer * Fri Oct 2 2015 mc@suse.de - version 1.0.6-1 - Run a check during build - implement File Module - disable SUSECloud module - add hypervisor type to gatherer output * Tue Sep 29 2015 mc@suse.de - version 1.0.5-1 - change json output format to be more specific about the dimensions - support reading from STDIN - update README * Fri Jun 19 2015 mc@suse.de - version 1.0.4-1 - move code into a subdir * Thu Jun 18 2015 mc@suse.de - version 1.0.3-1 - refactoring and cleanup - some python3 compatibility changes - update README - Build as noarch only on new distributions * Tue May 26 2015 mc@suse.de - version 1.0.2-1 - raise if verbose is set - console logging to stderr - return a dict with an id as key to be able to identify which result belongs to which node - strip trailing spaces from cpuDescription - add some more info to the output hash - add logging around the scanning to get start and end time in the logs - improve dynamic loading and add option to list expected parameters - add subpackages for modules * Tue May 19 2015 mc@suse.de - version 1.0.1-1 - Initial package release