moira-python-client 5.1.0__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.
Files changed (46) hide show
  1. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/CHANGELOG.md +4 -0
  2. {moira_python_client-5.1.0/moira_python_client.egg-info → moira_python_client-5.2.0}/PKG-INFO +1 -1
  3. moira_python_client-5.2.0/VERSION.txt +1 -0
  4. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/contact.py +1 -0
  5. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/contact/_managers.py +1 -0
  6. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/trigger.py +11 -2
  7. {moira_python_client-5.1.0 → moira_python_client-5.2.0/moira_python_client.egg-info}/PKG-INFO +1 -1
  8. moira_python_client-5.1.0/VERSION.txt +0 -1
  9. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/LICENSE +0 -0
  10. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/MANIFEST.in +0 -0
  11. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/README.md +0 -0
  12. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/__init__.py +0 -0
  13. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/client.py +0 -0
  14. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/__init__.py +0 -0
  15. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/base.py +0 -0
  16. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/config.py +0 -0
  17. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/event.py +0 -0
  18. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/health.py +0 -0
  19. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/notification.py +0 -0
  20. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/pattern.py +0 -0
  21. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/subscription.py +0 -0
  22. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/system_tag.py +0 -0
  23. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/tag.py +0 -0
  24. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/__init__.py +0 -0
  25. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/_managers.py +0 -0
  26. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/_models.py +0 -0
  27. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/contact/__init__.py +0 -0
  28. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/settings/__init__.py +0 -0
  29. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/settings/_managers.py +0 -0
  30. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/settings/_models.py +0 -0
  31. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/subscription/__init__.py +0 -0
  32. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/subscription/_managers.py +0 -0
  33. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/user/__init__.py +0 -0
  34. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/user/_managers.py +0 -0
  35. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/team/user/_models.py +0 -0
  36. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/models/user.py +0 -0
  37. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_client/moira.py +0 -0
  38. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_python_client.egg-info/SOURCES.txt +0 -0
  39. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_python_client.egg-info/dependency_links.txt +0 -0
  40. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_python_client.egg-info/requires.txt +0 -0
  41. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/moira_python_client.egg-info/top_level.txt +0 -0
  42. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/requirements.txt +0 -0
  43. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/setup.cfg +0 -0
  44. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/setup.py +0 -0
  45. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/test-requirements.txt +0 -0
  46. {moira_python_client-5.1.0 → moira_python_client-5.2.0}/tests/test_client.py +0 -0
@@ -1,3 +1,7 @@
1
+ # 5.1.1
2
+
3
+ extra_message field in contact support
4
+
1
5
  # 5.1.0
2
6
 
3
7
  System tags api support
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moira-python-client
3
- Version: 5.1.0
3
+ Version: 5.2.0
4
4
  Summary: Client for Moira - Alerting system based on Graphite data
5
5
  Home-page: https://github.com/moira-alert/python-moira-client
6
6
  Author: Alexander Lukyanchenko
@@ -0,0 +1 @@
1
+ 5.2.0
@@ -24,6 +24,7 @@ class Contact(Base):
24
24
  self.name = kwargs.get('name', None)
25
25
  self._id = kwargs.get('id', None)
26
26
  self.team_id = kwargs.get('team_id', None)
27
+ self.extra_message = kwargs.get('extra_message', None)
27
28
 
28
29
 
29
30
  class ContactManager:
@@ -13,6 +13,7 @@ class TeamContactManager:
13
13
  "name": contact.name,
14
14
  "type": contact.type,
15
15
  "value": contact.value,
16
+ "extra_message": contact.extra_message,
16
17
  }
17
18
 
18
19
  response = self._client.post(self._full_path(team_id), json=payload)
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moira-python-client
3
- Version: 5.1.0
3
+ Version: 5.2.0
4
4
  Summary: Client for Moira - Alerting system based on Graphite data
5
5
  Home-page: https://github.com/moira-alert/python-moira-client
6
6
  Author: Alexander Lukyanchenko
@@ -1 +0,0 @@
1
- 5.1.0