zabbix_action: Checking event source for 'pause_suppressed' parameter (#54951)

pull/54990/head
Ruben Tsirunyan 6 years ago committed by ansibot
parent 0fe63ec2d6
commit 97ac03f613

@ -803,10 +803,11 @@ class Action(object):
'enabled', 'enabled',
'disabled'], kwargs['status']) 'disabled'], kwargs['status'])
} }
if float(self._zapi.api_version().rsplit('.', 1)[0]) >= 4.0: if kwargs['event_source'] == 'trigger':
_params['pause_suppressed'] = '1' if kwargs['pause_in_maintenance'] else '0' if float(self._zapi.api_version().rsplit('.', 1)[0]) >= 4.0:
else: _params['pause_suppressed'] = '1' if kwargs['pause_in_maintenance'] else '0'
_params['maintenance_mode'] = '1' if kwargs['pause_in_maintenance'] else '0' else:
_params['maintenance_mode'] = '1' if kwargs['pause_in_maintenance'] else '0'
return _params return _params

Loading…
Cancel
Save