Skip to content

Commit

Permalink
Only add the Bakery wato plugin if the bakery is available.
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuka authored Jun 4, 2020
1 parent d7791ee commit 8fb4801
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions web/plugins/wato/agent_bakery_win_adsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
)

try:
from cmk.gui.cee.plugins.wato.agent_bakery import RulespecGroupMonitoringAgentsWindowsAgent
except:
from cmk.gui.plugins.wato import RulespecGroupCheckParametersStorage as RulespecGroupMonitoringAgentsWindowsAgent
from cmk.gui.cee.plugins.wato.agent_bakery import (
RulespecGroupMonitoringAgentsWindowsAgent
)
except Exception:
RulespecGroupMonitoringAgentsWindowsAgent = None


def _valuespec_agent_config_win_adsync():
return DropdownChoice(
title=_("Azure AD Connect Sync"),
Expand All @@ -26,10 +29,11 @@ def _valuespec_agent_config_win_adsync():
],
)

rulespec_registry.register(
HostRulespec(
group=RulespecGroupMonitoringAgentsWindowsAgent,
name="agent_config:win_adsync",
valuespec=_valuespec_agent_config_win_adsync,
))

if RulespecGroupMonitoringAgentsWindowsAgent is not None:
rulespec_registry.register(
HostRulespec(
group=RulespecGroupMonitoringAgentsWindowsAgent,
name="agent_config:win_adsync",
valuespec=_valuespec_agent_config_win_adsync,
))

0 comments on commit 8fb4801

Please sign in to comment.