moira-python-client 5.1.1__tar.gz → 5.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {moira_python_client-5.1.1/moira_python_client.egg-info → moira_python_client-5.2.0}/PKG-INFO +1 -1
- moira_python_client-5.2.0/VERSION.txt +1 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/trigger.py +11 -2
- {moira_python_client-5.1.1 → moira_python_client-5.2.0/moira_python_client.egg-info}/PKG-INFO +1 -1
- moira_python_client-5.1.1/VERSION.txt +0 -1
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/CHANGELOG.md +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/LICENSE +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/MANIFEST.in +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/README.md +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/__init__.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/client.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/__init__.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/base.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/config.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/contact.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/event.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/health.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/notification.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/pattern.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/subscription.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/system_tag.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/tag.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/__init__.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/_managers.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/_models.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/contact/__init__.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/contact/_managers.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/settings/__init__.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/settings/_managers.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/settings/_models.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/subscription/__init__.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/subscription/_managers.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/user/__init__.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/user/_managers.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/user/_models.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/user.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/moira.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_python_client.egg-info/SOURCES.txt +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_python_client.egg-info/dependency_links.txt +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_python_client.egg-info/requires.txt +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_python_client.egg-info/top_level.txt +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/requirements.txt +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/setup.cfg +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/setup.py +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/test-requirements.txt +0 -0
- {moira_python_client-5.1.1 → moira_python_client-5.2.0}/tests/test_client.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5.2.0
|
|
@@ -25,6 +25,7 @@ class Trigger(Base):
|
|
|
25
25
|
name,
|
|
26
26
|
tags,
|
|
27
27
|
targets,
|
|
28
|
+
team_id=None,
|
|
28
29
|
warn_value=None,
|
|
29
30
|
error_value=None,
|
|
30
31
|
desc='',
|
|
@@ -42,6 +43,7 @@ class Trigger(Base):
|
|
|
42
43
|
"""
|
|
43
44
|
|
|
44
45
|
:param client: api client
|
|
46
|
+
:param team_id: str team id of a team that owns this trigger.
|
|
45
47
|
:param name: str trigger name
|
|
46
48
|
:param tags: list of str tags for trigger
|
|
47
49
|
:param targets: list of str targets
|
|
@@ -63,6 +65,7 @@ class Trigger(Base):
|
|
|
63
65
|
self._client = client
|
|
64
66
|
|
|
65
67
|
self._id = kwargs.get('id', None)
|
|
68
|
+
self.team_id = team_id
|
|
66
69
|
self.name = name
|
|
67
70
|
self.tags = tags
|
|
68
71
|
self.targets = targets
|
|
@@ -139,6 +142,7 @@ class Trigger(Base):
|
|
|
139
142
|
def _send_request(self, trigger_id=None):
|
|
140
143
|
data = {
|
|
141
144
|
'name': self.name,
|
|
145
|
+
'team_id': self.team_id,
|
|
142
146
|
'tags': self.tags,
|
|
143
147
|
'targets': self.targets,
|
|
144
148
|
'warn_value': self.warn_value,
|
|
@@ -338,13 +342,14 @@ class TriggerManager:
|
|
|
338
342
|
elif not 'trigger_id' in result:
|
|
339
343
|
raise ResponseStructureError("invalid api response", result)
|
|
340
344
|
|
|
341
|
-
def search(self, only_problems, page, text):
|
|
345
|
+
def search(self, only_problems, page, text, team_id=''):
|
|
342
346
|
"""
|
|
343
347
|
Search triggers
|
|
344
348
|
|
|
345
349
|
:param only_problems: Restricts the result to errors only. Example: false
|
|
346
350
|
:param page: Defines the number of the displayed page. E.g, page=2 would display the 2nd page. Example: 1
|
|
347
351
|
:param text: Query to perform a search for. Example: cpu
|
|
352
|
+
:param team_id: str team id of a team that owns this trigger.
|
|
348
353
|
|
|
349
354
|
:return: matching triggers list
|
|
350
355
|
|
|
@@ -354,8 +359,9 @@ class TriggerManager:
|
|
|
354
359
|
'onlyProblems': only_problems,
|
|
355
360
|
'page': page,
|
|
356
361
|
'text': text,
|
|
362
|
+
'teamID': team_id,
|
|
357
363
|
}
|
|
358
|
-
result = self._client.get(self._full_path(), params=params)
|
|
364
|
+
result = self._client.get(self._full_path('search'), params=params)
|
|
359
365
|
if 'list' not in result:
|
|
360
366
|
raise ResponseStructureError("list doesn't exist in response", result)
|
|
361
367
|
|
|
@@ -522,6 +528,7 @@ class TriggerManager:
|
|
|
522
528
|
name,
|
|
523
529
|
tags,
|
|
524
530
|
targets,
|
|
531
|
+
team_id=None,
|
|
525
532
|
warn_value=None,
|
|
526
533
|
error_value=None,
|
|
527
534
|
desc='',
|
|
@@ -540,6 +547,7 @@ class TriggerManager:
|
|
|
540
547
|
"""
|
|
541
548
|
Creates new trigger. To save it call save() method of Trigger.
|
|
542
549
|
:param name: str trigger name
|
|
550
|
+
:param team_id: str team id of a team that owns this trigger.
|
|
543
551
|
:param tags: list of str tags for trigger
|
|
544
552
|
:param targets: list of str targets
|
|
545
553
|
:param warn_value: float warning value (if T1 <= warn_value)
|
|
@@ -560,6 +568,7 @@ class TriggerManager:
|
|
|
560
568
|
"""
|
|
561
569
|
return Trigger(
|
|
562
570
|
client=self._client,
|
|
571
|
+
team_id=team_id,
|
|
563
572
|
name=name,
|
|
564
573
|
tags=tags,
|
|
565
574
|
targets=targets,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5.1.1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/__init__.py
RENAMED
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/_managers.py
RENAMED
|
File without changes
|
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/contact/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/settings/_models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/user/__init__.py
RENAMED
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/user/_managers.py
RENAMED
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_client/models/team/user/_models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_python_client.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_python_client.egg-info/requires.txt
RENAMED
|
File without changes
|
{moira_python_client-5.1.1 → moira_python_client-5.2.0}/moira_python_client.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|