From 7d92531db5001ada780e03748aefc7b198c860ba Mon Sep 17 00:00:00 2001 From: unclebconnor Date: Mon, 5 Aug 2019 10:58:58 -0700 Subject: [PATCH 1/2] removed delete comment functionality and DeletableAPIResource for events and comments. No longer supported --- datadog/api/comments.py | 2 +- datadog/api/events.py | 2 +- datadog/dogshell/comment.py | 9 --------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/datadog/api/comments.py b/datadog/api/comments.py index 3432bcac3..28bd00ad5 100644 --- a/datadog/api/comments.py +++ b/datadog/api/comments.py @@ -2,7 +2,7 @@ DeletableAPIResource -class Comment(CreateableAPIResource, UpdatableAPIResource, DeletableAPIResource): +class Comment(CreateableAPIResource, UpdatableAPIResource): """ A wrapper around Comment HTTP API. """ diff --git a/datadog/api/events.py b/datadog/api/events.py index bd15a1fd3..9c03904e2 100644 --- a/datadog/api/events.py +++ b/datadog/api/events.py @@ -3,7 +3,7 @@ from datadog.util.compat import iteritems -class Event(GetableAPIResource, CreateableAPIResource, SearchableAPIResource, DeletableAPIResource): +class Event(GetableAPIResource, CreateableAPIResource, SearchableAPIResource): """ A wrapper around Event HTTP API. """ diff --git a/datadog/dogshell/comment.py b/datadog/dogshell/comment.py index f10449796..06b8ff678 100644 --- a/datadog/dogshell/comment.py +++ b/datadog/dogshell/comment.py @@ -158,12 +158,3 @@ def _show(cls, args): print('url\t\t' + res['event']['url']) print('resource\t' + res['event']['resource']) print('message\t\t' + res['event']['text'].__repr__()) - - @classmethod - def _delete(cls, args): - api._timeout = args.timeout - id = args.comment_id - res = api.Comment.delete(id) - if res is not None: - report_warnings(res) - report_errors(res) From b51996ae504bce99d9eed1ea1ffb610c71d50a40 Mon Sep 17 00:00:00 2001 From: unclebconnor Date: Mon, 5 Aug 2019 11:07:55 -0700 Subject: [PATCH 2/2] removed imports --- datadog/api/comments.py | 3 +-- datadog/api/events.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/datadog/api/comments.py b/datadog/api/comments.py index 28bd00ad5..0b442feef 100644 --- a/datadog/api/comments.py +++ b/datadog/api/comments.py @@ -1,5 +1,4 @@ -from datadog.api.resources import CreateableAPIResource, UpdatableAPIResource, \ - DeletableAPIResource +from datadog.api.resources import CreateableAPIResource, UpdatableAPIResource class Comment(CreateableAPIResource, UpdatableAPIResource): diff --git a/datadog/api/events.py b/datadog/api/events.py index 9c03904e2..4aae887dd 100644 --- a/datadog/api/events.py +++ b/datadog/api/events.py @@ -1,5 +1,5 @@ from datadog.api.resources import GetableAPIResource, CreateableAPIResource, \ - SearchableAPIResource, DeletableAPIResource + SearchableAPIResource from datadog.util.compat import iteritems