Skip to content

Commit

Permalink
Added trigger: alone_metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kolkov committed Feb 5, 2021
1 parent ea0ed94 commit 897aced
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion moira_client/models/trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(
trigger_type=None,
is_remote=False,
mute_new_metrics=False,
alone_metrics=None,
**kwargs):
"""
Expand All @@ -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
Expand Down Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -545,6 +549,7 @@ def create(
trigger_type=None,
is_remote=False,
mute_new_metrics=False,
alone_metrics=None,
**kwargs
):
"""
Expand All @@ -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
"""
Expand All @@ -580,6 +586,7 @@ def create(
trigger_type,
is_remote,
mute_new_metrics,
alone_metrics,
**kwargs
)

Expand Down

0 comments on commit 897aced

Please sign in to comment.