kuhn-ruess / Checkmk-Checks

Checks and Stuff for Check_MK
MIT License
36 stars 20 forks source link

qemu plugin doesn't work with checkmk 2.2 #57

Closed dnlldl closed 1 year ago

dnlldl commented 1 year ago

Here is the error:

Failed to load plugin /omd/sites/home/local/share/check_mk/web/plugins/wato/qemu.py: name 'DropdownChoice' is not defined
Traceback (most recent call last):
  File "/omd/sites/home/lib/python3/cmk/gui/utils/__init__.py", line 66, in load_web_plugins
    exec(f.read(), globalvars)
  File "<string>", line 29, in <module>
NameError: name 'DropdownChoice' is not defined
Incompatible file 'qemu' of extension package 'qemu 2.0.1'
Error: name 'DropdownChoice' is not defined

I think new imports are required.

dnlldl commented 1 year ago

Here is what needs to be added to qemu.py:

from cmk.gui.valuespec import DropdownChoice
Bastian-Kuhn commented 1 year ago

Hello,

Does the new Version resolve your Problem (Just pushed to git)

Would be nice to get your Feedback, I then would update the exchange.

Am 17.06.2023 um 08:21 schrieb dnlldl @.***>:

from cmk.gui.valuespec import DropdownChoice

dnlldl commented 1 year ago

Hello, Does the new Version resolve your Problem (Just pushed to git) Would be nice to get your Feedback, I then would update the exchange.

Hello! I can confirm this new version does indeed fix the issue, thank you very much again for your work.