Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package monitoring-plugins-http_json for 
openSUSE:Factory checked in at 2022-09-17 20:10:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/monitoring-plugins-http_json (Old)
 and      /work/SRC/openSUSE:Factory/.monitoring-plugins-http_json.new.2083 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "monitoring-plugins-http_json"

Sat Sep 17 20:10:42 2022 rev:2 rq:1004170 version:2.1.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/monitoring-plugins-http_json/monitoring-plugins-http_json.changes
        2022-03-11 11:47:42.866843680 +0100
+++ 
/work/SRC/openSUSE:Factory/.monitoring-plugins-http_json.new.2083/monitoring-plugins-http_json.changes
      2022-09-17 20:10:54.137254190 +0200
@@ -1,0 +2,8 @@
+Fri Sep 16 17:55:16 UTC 2022 - Martin Li??ka <mli...@suse.cz>
+
+- Update to 2.1.2:
+  * Fix missing type conversion for --data by @K0nne in #77
+  * Add CLI Flag to change HTTP method by @martialblog in #79
+  * Update Makefile and Workflows by @martialblog in #78
+
+-------------------------------------------------------------------

Old:
----
  nagios-http-json-2.1.1.tar.gz

New:
----
  nagios-http-json-2.1.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ monitoring-plugins-http_json.spec ++++++
--- /var/tmp/diff_new_pack.ToR4cX/_old  2022-09-17 20:10:54.569255437 +0200
+++ /var/tmp/diff_new_pack.ToR4cX/_new  2022-09-17 20:10:54.577255460 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package monitoring-plugins-http_json
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -22,7 +22,7 @@
 %define skip_python39 1
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           monitoring-plugins-http_json
-Version:        2.1.1
+Version:        2.1.2
 Release:        0
 Summary:        Plugin for Nagios which checks json values from a given HTTP 
endpoint
 License:        Apache-2.0

++++++ nagios-http-json-2.1.1.tar.gz -> nagios-http-json-2.1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/nagios-http-json-2.1.1/.github/workflows/unittest.yml 
new/nagios-http-json-2.1.2/.github/workflows/unittest.yml
--- old/nagios-http-json-2.1.1/.github/workflows/unittest.yml   2021-01-22 
10:39:33.000000000 +0100
+++ new/nagios-http-json-2.1.2/.github/workflows/unittest.yml   2022-09-15 
15:25:38.000000000 +0200
@@ -7,21 +7,20 @@
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.6, 3.7, 3.8]
+        python-version: [3.8, 3,9]
     name: GitHub Action
     steps:
     - name: Checkout
       uses: actions/checkout@v2
+    - name: Install dependencies
+      run: |
+        python -m pip install -r requirements-dev.txt
     - name: Lint
       run: |
-        pip3 install --upgrade pip wheel setuptools
-        pip3 install pylint
-        python3 -m pylint check_http_json.py
+        make lint
     - name: Unit Test
       run: |
-        python3 -m unittest discover
+        make test
     - name: Coverage
       run: |
-        pip3 install coverage
-        python3 -m coverage run -m unittest discover
-        python3 -m coverage report -m --include check_http_json.py
+        make coverage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nagios-http-json-2.1.1/.pylintrc 
new/nagios-http-json-2.1.2/.pylintrc
--- old/nagios-http-json-2.1.1/.pylintrc        2021-01-22 10:39:33.000000000 
+0100
+++ new/nagios-http-json-2.1.2/.pylintrc        2022-09-15 15:25:38.000000000 
+0200
@@ -1,5 +1,21 @@
 # pylint config
-[MESSAGES CONTROL]
-disable=line-too-long, redefined-outer-name, too-many-arguments, 
too-many-instance-attributes, fixme, invalid-name, superfluous-parens, 
missing-function-docstring, missing-module-docstring, multiple-imports, 
no-else-return, too-many-return-statements, too-many-branches, 
too-many-statements
 [MASTER]
 ignore-patterns=^test.*
+
+[MESSAGES CONTROL]
+disable=fixme,
+        consider-using-f-string,
+        invalid-name,
+        line-too-long,
+        missing-function-docstring,
+        missing-module-docstring,
+        multiple-imports,
+        no-else-return,
+        redefined-outer-name,
+        superfluous-parens,
+        too-many-locals,
+        too-many-arguments,
+        too-many-branches,
+        too-many-instance-attributes,
+        too-many-return-statements,
+        too-many-statements
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nagios-http-json-2.1.1/Makefile 
new/nagios-http-json-2.1.2/Makefile
--- old/nagios-http-json-2.1.1/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ new/nagios-http-json-2.1.2/Makefile 2022-09-15 15:25:38.000000000 +0200
@@ -0,0 +1,9 @@
+.PHONY: lint test coverage
+
+lint:
+       python -m pylint check_http_json.py
+test:
+       python -m unittest discover
+coverage:
+       python -m coverage run -m unittest discover
+       python -m coverage report -m --include check_http_json.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nagios-http-json-2.1.1/README.md 
new/nagios-http-json-2.1.2/README.md
--- old/nagios-http-json-2.1.1/README.md        2021-01-22 10:39:33.000000000 
+0100
+++ new/nagios-http-json-2.1.2/README.md        2022-09-15 15:25:38.000000000 
+0200
@@ -38,7 +38,7 @@
 argument specified rules and determines the status and performance data for
 that service.
 
-Version: 2.0.0 (2020-03-22)
+Version: 2.1.2 (2022-09-15)
 
 optional arguments:
   -h, --help            show this help message and exit
@@ -46,6 +46,8 @@
   -s, --ssl             use TLS to connect to remote host
   -H HOST, --host HOST  remote host to query
   -k, --insecure        do not check server SSL certificate
+  -X {GET,POST}, --request {GET,POST}
+                        Specifies a custom request method to use when 
communicating with the HTTP server
   -V, --version         print version of this plugin
   --cacert CACERT       SSL CA certificate
   --cert CERT           SSL client certificate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nagios-http-json-2.1.1/check_http_json.py 
new/nagios-http-json-2.1.2/check_http_json.py
--- old/nagios-http-json-2.1.1/check_http_json.py       2021-01-22 
10:39:33.000000000 +0100
+++ new/nagios-http-json-2.1.2/check_http_json.py       2022-09-15 
15:25:38.000000000 +0200
@@ -24,8 +24,8 @@
 CRITICAL_CODE = 2
 UNKNOWN_CODE = 3
 
-__version__ = '2.0.0'
-__version_date__ = '2020-03-22'
+__version__ = '2.1.2'
+__version_date__ = '2022-09-15'
 
 class NagiosHelper:
     """
@@ -430,6 +430,8 @@
                         help='remote host to query')
     parser.add_argument('-k', '--insecure', action='store_true',
                         help='do not check server SSL certificate')
+    parser.add_argument('-X', '--request', dest='method', default='GET', 
choices=['GET', 'POST'],
+                        help='Specifies a custom request method to use when 
communicating  with  the HTTP server')
     parser.add_argument('-V', '--version', action='store_true',
                         help='print version of this plugin')
     parser.add_argument('--cacert',
@@ -542,7 +544,7 @@
     if args.ssl:
         url = "https://%s"; % args.host
 
-        context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+        context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
         context.options |= ssl.OP_NO_SSLv2
         context.options |= ssl.OP_NO_SSLv3
 
@@ -587,7 +589,7 @@
     json_data = ''
 
     try:
-        req = urllib.request.Request(url)
+        req = urllib.request.Request(url, method=args.method)
         req.add_header("User-Agent", "check_http_json")
         if args.auth:
             authbytes = str(args.auth).encode()
@@ -599,14 +601,17 @@
             for header in headers:
                 req.add_header(header, headers[header])
         if args.timeout and args.data:
+            databytes = str(args.data).encode()
             response = urllib.request.urlopen(req, timeout=args.timeout,
-                                              data=args.data, context=context)
+                                              data=databytes, context=context)
         elif args.timeout:
             response = urllib.request.urlopen(req, timeout=args.timeout,
                                               context=context)
         elif args.data:
-            response = urllib.request.urlopen(req, data=args.data, 
context=context)
+            databytes = str(args.data).encode()
+            response = urllib.request.urlopen(req, data=databytes, 
context=context)
         else:
+            # pylint: disable=consider-using-with
             response = urllib.request.urlopen(req, context=context)
 
         json_data = response.read()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nagios-http-json-2.1.1/makefile 
new/nagios-http-json-2.1.2/makefile
--- old/nagios-http-json-2.1.1/makefile 2021-01-22 10:39:33.000000000 +0100
+++ new/nagios-http-json-2.1.2/makefile 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-.PHONY: lint test coverage
-
-lint:
-       python3 -m pylint check_http_json.py
-test:
-       python3 -m unittest discover
-coverage:
-       python3 -m coverage run -m unittest discover
-       python3 -m coverage report -m --include check_http_json.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nagios-http-json-2.1.1/requirements-dev.txt 
new/nagios-http-json-2.1.2/requirements-dev.txt
--- old/nagios-http-json-2.1.1/requirements-dev.txt     1970-01-01 
01:00:00.000000000 +0100
+++ new/nagios-http-json-2.1.2/requirements-dev.txt     2022-09-15 
15:25:38.000000000 +0200
@@ -0,0 +1,2 @@
+coverage==6.4.4
+pylint==2.15.2

Reply via email to