From c2153427f10b11f59862106accdf280bb07b9722 Mon Sep 17 00:00:00 2001 From: Robert Sander Date: Tue, 19 Dec 2023 14:56:12 +0100 Subject: [PATCH] removes API errors on stderr use try/except and catch the HTTPError --- check_mk_api/check_mk_api-5.5.0.mkp | Bin 8821 -> 0 bytes check_mk_api/check_mk_api-5.5.1.mkp | Bin 0 -> 8829 bytes check_mk_api/checkmkapi.html | 7 +++---- check_mk_api/lib/python3/checkmkapi.py | 16 ++++++++++------ 4 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 check_mk_api/check_mk_api-5.5.0.mkp create mode 100644 check_mk_api/check_mk_api-5.5.1.mkp diff --git a/check_mk_api/check_mk_api-5.5.0.mkp b/check_mk_api/check_mk_api-5.5.0.mkp deleted file mode 100644 index 4601b39a76cc76e23968cbdbfc56ad400da24a13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8821 zcmbuE(_bWx!-ccmRx{ORH)cH4%{wrxzc*|zQ4+U%NaZ?DJ11@jFjuk?jMwyu!{|jx!T!N(xzI zw78Yb=pUYk_j7l%D>C5#FO9lv&VD=N2sng5XjTP*UJHOw%YFmm@kpW69f9)o<;EN> zBIX0>ci*R@>)rQ2T7~WR#8Pie(%Mc$_c$|4d@9BLKo$<4y8un@2;7>nj^=B61@;H# zFa!ZZKe-k9@9&Rcp)-JwReAF{%Pf;~=ugP%veCxx(s!yXGecs-=R&14_9wp{-*&h( zZ0}*3YXj~B8vrec$ngQ(|4RC{_}Q29{t&^Xuxr!b!K5a=ak|WlI>)+;c4BU?-^Fj$ z=pA3i))hAB$a-Zy0;nW5UFJM@<1;tp&d6?hy)L?~?|;Y^Zkj9Qqa_7@m=6|yaggWN z?DaIqDFQ0oTtYaD_(HbRN}=8gc`y{VFaPos9|(NWq$MRY_Vzl?)-k@IOLOQif}=sL zXY-kfPEql1`W51wQ5WeV{{0PO1@XM|_)#s#a{3c1D}D1Z zR|9Bf>A-jJ0U8x8TBvdCuW3H}z%=}5{*>N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_P z*{w(aIf^c%Q~(L34%eX5hIkd2PcxdU2RYjg`;XpPN1i`VR*jBi-dv zyZYCk=oZUqQ@u_pEt6d7)%msbk*!d73+M*}*-rWm`UVs=;{iVgx(dqb&CfcTt;i}T zpQu2)66<+CcKA=jh&1~nnROdwx~{Sg_}OC_CGLzOmuwO2YZC<>S6z1#pKm$&cx)Ne z>S(I%!Mi?_G&?mO{U%GL^>MS&AQ|@E=bKh6mt60K0@I7UZ>2lWH%(<2bD1=Zb{yP4 zreJE{e%Sb|L`Ge`;xz*^4Yy%xD@hoGeAAoY*8h(Ui2%UZXZ#VyT^!-=6K>KFyv7oIH?D-SZo|W-4Mw# z2fHc7^H;$#dq|9kzxRBLT-j8kx2$dl{pt|()53YKs@M6)>p)h>b`S8Ijt@*oAhY-9 z$3Ik`a7`{a^T*`d&5C%Hi@&jTz(-rQ>Umwh0*}Y9Zj2%GS$5AVRTc2>98w*f`*V)d z-PIdyQt>Uvt?gU2nfnKJ$@>np&V(QsQ``>U&#{?G_nH_zyQiO;DN?RCj8S`j&w=_e zB&`=o@c-5Xdc_gL?*f#bBl2`75Z(TrYLw<5u`0xhikzgXToV|S+`OD%dAy_KXiFk^ zioOXL94ynjK&m*=`t#F#rI;P@Yw$Vin~+oLk+DwH{D_O_y}uKg8xookFUkFKlH9B4 zB9-h>_Zg95L!9(&RPrR8-EJJ5N(%Ik$BSi340R~qdHAAc&&K;FC$rjUnb-reN$JR1 zxfr)KL}pv@-@gMH9gldW-1yv55LDbh3Bh!5wgckh??>%u-V(24 z?%2+e^mLErB3X(4Mv{dK&q%NKT)$H4zuVy3oy{%JI+05E4NjPefbW}d z8wK}(<-a?l9NJgaENsVCnn{Pr*X9AT~;GF{U}isIn~5o9p#acO{{s^+JSYGF diff --git a/check_mk_api/check_mk_api-5.5.1.mkp b/check_mk_api/check_mk_api-5.5.1.mkp new file mode 100644 index 0000000000000000000000000000000000000000..4848aa27fb194a56357c4c71308df6f56252f8cf GIT binary patch literal 8829 zcmbt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f@BexS^H@N>9LHH!Y27+VP>w5WD&N`#&fZ8UHFvwl<5nIL5pSsZgv z1!~^qzZzK-X|0*1qjI^>?%}xETjbDMOWhdqj{B{jypephQ7O5O0SQI0 zsx=eS2KaWdgS5xL%|a@Bgj{l}1`v83)Hpi7z*BS3E*g$1xOJrN20P^EB-URMm8fq& z=+TDbzp3v_G6x}=@;Ha*mKE-&u_5i~Lc}oC0Q!O2ede5CXbU^UIi^sBXiG(B)Obs~ gQ(*RqR;kcJxvG1G=KuF>OTGJ)`Ne7kMFb7?KR9wbLI3~& literal 0 HcmV?d00001 diff --git a/check_mk_api/checkmkapi.html b/check_mk_api/checkmkapi.html index cf11bab4..cd98648c 100644 --- a/check_mk_api/checkmkapi.html +++ b/check_mk_api/checkmkapi.html @@ -20,10 +20,9 @@ json
os
requests
-sys
-time
-warnings
-

+time
+warnings
+

diff --git a/check_mk_api/lib/python3/checkmkapi.py b/check_mk_api/lib/python3/checkmkapi.py index 65989d54..3d66fe9d 100644 --- a/check_mk_api/lib/python3/checkmkapi.py +++ b/check_mk_api/lib/python3/checkmkapi.py @@ -15,7 +15,7 @@ import os import json import time -import sys +# import sys import configparser import json @@ -89,8 +89,8 @@ def _check_response(self, resp): else: data = {} etag = resp.headers.get('ETag', '').strip('"') - if resp.status_code >= 400: - sys.stderr.write("%r\n" % data) + # if resp.status_code >= 400: + # sys.stderr.write("%r\n" % data) return data, etag, resp def _get_url(self, uri, data={}): @@ -1369,7 +1369,9 @@ def create_notification_rule(self, rule_config): """ data, etag, resp = self._post_url( "domain-types/notification_rule/collections/all", - data=rule_config, + data={ + "rule_config": rule_config, + }, ) if resp.status_code == 200: return data, etag @@ -1438,7 +1440,9 @@ def edit_notification_rule(self, rule_id, rule_config): """ data, etag, resp = self._put_url( f"objects/notification_rule/{rule_id}", - data=params + data={ + "rule_config": rule_config, + }, ) if resp.status_code == 200: return data, etag @@ -1503,7 +1507,7 @@ def _api_request(self, api_url, params, data=None): else: return eval(resp.text) else: - sys.stderr.write("%s\n" % resp.text) + # sys.stderr.write("%s\n" % resp.text) resp.raise_for_status() def view(self, view_name, **kwargs):
 
Classes