mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 19:10:10 +00:00
Fix non-noderange alert specification.
The change in to accomodate nodarange without per-node distinct input claimed the single input data exclusively for multimode. Correct by pulling the singleton code to be common if the check breaks from the for loop.
This commit is contained in:
parent
224663d0c8
commit
28a13da118
@ -1471,18 +1471,18 @@ class InputAlertDestination(ConfluentMessage):
|
||||
self.valid_alert_params[key](inputdata[node][key])
|
||||
else:
|
||||
return
|
||||
for key in inputdata:
|
||||
if key not in self.valid_alert_params:
|
||||
raise exc.InvalidArgumentException(
|
||||
'Unrecognized alert parameter ' + key)
|
||||
if isinstance(inputdata[key], dict):
|
||||
inputdata[key] = self.valid_alert_params[key](
|
||||
inputdata[key]['value'])
|
||||
else:
|
||||
inputdata[key] = self.valid_alert_params[key](
|
||||
inputdata[key])
|
||||
for node in nodes:
|
||||
self.alertcfg[node] = inputdata
|
||||
for key in inputdata:
|
||||
if key not in self.valid_alert_params:
|
||||
raise exc.InvalidArgumentException(
|
||||
'Unrecognized alert parameter ' + key)
|
||||
if isinstance(inputdata[key], dict):
|
||||
inputdata[key] = self.valid_alert_params[key](
|
||||
inputdata[key]['value'])
|
||||
else:
|
||||
inputdata[key] = self.valid_alert_params[key](
|
||||
inputdata[key])
|
||||
for node in nodes:
|
||||
self.alertcfg[node] = inputdata
|
||||
|
||||
def alert_params_by_node(self, node):
|
||||
return self.alertcfg[node]
|
||||
|
Loading…
Reference in New Issue
Block a user