File opensuse-3000-libvirt-engine-fixes-251.patch of Package salt
From 78f2a450ea51a7e72eb0e712131e23fe2777a4ac Mon Sep 17 00:00:00 2001
From: Jochen Breuer <jbreuer@suse.de>
Date: Fri, 3 Jul 2020 14:43:53 +0200
Subject: [PATCH] Opensuse 3000 libvirt engine fixes (#251)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Blacken libvirt-engines
* libvirt events engine: constant fixes
The libvirt constants for pool and nodedev events need tweaking since
they don't match the rule used to autogenerate them. Fixes these warnings
at the engine start.
Skipping "pool/lifecycle" events: libvirt too old
Skipping "pool/refresh" events: libvirt too old
Skipping "nodedev/lifecycle" events: libvirt too old
Skipping "nodedev/update" events: libvirt too old
Co-authored-by: Cédric Bosdonnat <cbosdonnat@suse.com>
---
changelog/57746.fixed | 1 +
salt/engines/libvirt_events.py | 2 --
tests/unit/engines/test_libvirt_events.py | 4 ----
3 files changed, 1 insertion(+), 6 deletions(-)
create mode 100644 changelog/57746.fixed
diff --git a/changelog/57746.fixed b/changelog/57746.fixed
new file mode 100644
index 0000000000..5102bb04e9
--- /dev/null
+++ b/changelog/57746.fixed
@@ -0,0 +1 @@
+Fix the registration of libvirt pool and nodedev events
diff --git a/salt/engines/libvirt_events.py b/salt/engines/libvirt_events.py
index 45983fe9a0..c090b64a10 100644
--- a/salt/engines/libvirt_events.py
+++ b/salt/engines/libvirt_events.py
@@ -63,10 +63,8 @@ A polkit rule like the following one will allow `salt` user to connect to libvir
.. versionadded:: 2019.2.0
"""
-
import logging
-# Import salt libs
import salt.utils.event
# pylint: disable=no-name-in-module,import-error
diff --git a/tests/unit/engines/test_libvirt_events.py b/tests/unit/engines/test_libvirt_events.py
index 63623c4d79..5cf80f0bc7 100644
--- a/tests/unit/engines/test_libvirt_events.py
+++ b/tests/unit/engines/test_libvirt_events.py
@@ -1,12 +1,8 @@
"""
unit tests for the libvirt_events engine
"""
-# Import Python libs
-# Import Salt Libs
import salt.engines.libvirt_events as libvirt_events
-
-# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.mock import MagicMock, patch
from tests.support.unit import TestCase
--
2.29.2