From 897aced5301346aecb071adacedc2589a04222be Mon Sep 17 00:00:00 2001 From: Andrey Kolkov Date: Fri, 5 Feb 2021 10:14:26 +0400 Subject: [PATCH] Added trigger: alone_metrics --- moira_client/models/trigger.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/moira_client/models/trigger.py b/moira_client/models/trigger.py index d97ffb8..2e1deed 100644 --- a/moira_client/models/trigger.py +++ b/moira_client/models/trigger.py @@ -36,6 +36,7 @@ def __init__( trigger_type=None, is_remote=False, mute_new_metrics=False, + alone_metrics=None, **kwargs): """ @@ -53,6 +54,7 @@ def __init__( :param trigger_type: str trigger type :param is_remote: bool use remote storage :param mute_new_metrics: bool mute new metrics + :param alone_metrics: dict with targets of alone metrics :param kwargs: additional parameters """ self._client = client @@ -90,6 +92,7 @@ def __init__( self.is_remote = is_remote self.mute_new_metrics = mute_new_metrics + self.alone_metrics = alone_metrics def resolve_type(self, trigger_type): """ @@ -160,7 +163,8 @@ def _send_request(self, trigger_id=None): 'expression': self.expression, 'is_remote': self.is_remote, 'trigger_type': self.trigger_type, - 'mute_new_metrics': self.mute_new_metrics + 'mute_new_metrics': self.mute_new_metrics, + 'alone_metrics': self.alone_metrics, } if trigger_id: @@ -545,6 +549,7 @@ def create( trigger_type=None, is_remote=False, mute_new_metrics=False, + alone_metrics=None, **kwargs ): """ @@ -562,6 +567,7 @@ def create( :param trigger_type: str trigger type :param is_remote: bool use remote storage :param mute_new_metrics: bool mute new metrics + :param alone_metrics: dict with targets of alone metrics :param kwargs: additional trigger params :return: Trigger """ @@ -580,6 +586,7 @@ def create( trigger_type, is_remote, mute_new_metrics, + alone_metrics, **kwargs )