From e165b57a712417d6db584d93fa2b736a99d72af0 Mon Sep 17 00:00:00 2001 From: kaburagisec Date: Tue, 18 Nov 2025 19:48:39 +0700 Subject: [PATCH 1/4] docs(README): Update Codacy badge image for consistency --- README.md | 2 +- README_ID.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 447bf4c..8d752dd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

ONVIF Python

-Codacy grade + Ask DeepWiki PyPI Version Pepy Total Downloads diff --git a/README_ID.md b/README_ID.md index 04b1847..1ac92fa 100644 --- a/README_ID.md +++ b/README_ID.md @@ -1,7 +1,7 @@

ONVIF Python

-Codacy grade + Ask DeepWiki PyPI Version Pepy Total Downloads From 7e4d779dd48a062ffcaa999c38f597d8da99f111 Mon Sep 17 00:00:00 2001 From: kaburagisec Date: Tue, 18 Nov 2025 19:56:46 +0700 Subject: [PATCH 2/4] =?UTF-8?q?Bump=20version=200.2.5=20=E2=86=92=200.2.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- README_ID.md | 6 +++--- onvif/cli/interactive.py | 4 ++-- onvif/cli/main.py | 4 ++-- pyproject.toml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8d752dd..924a477 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@
Ask DeepWiki -PyPI Version +PyPI Version Pepy Total Downloads
Build @@ -319,7 +319,7 @@ usage: onvif [-h] [--host HOST] [--port PORT] [--username USERNAME] [--password [--cache {all,db,mem,none}] [--health-check-interval HEALTH_CHECK_INTERVAL] [--output OUTPUT] [--version] [service] [method] [params ...] -ONVIF Terminal Client — v0.2.5 +ONVIF Terminal Client — v0.2.6 https://github.com/nirsimetri/onvif-python positional arguments: @@ -400,7 +400,7 @@ Examples: 2. Interactive Shell ```bash -ONVIF Interactive Shell — v0.2.5 +ONVIF Interactive Shell — v0.2.6 https://github.com/nirsimetri/onvif-python Basic Commands: diff --git a/README_ID.md b/README_ID.md index 1ac92fa..d6eda97 100644 --- a/README_ID.md +++ b/README_ID.md @@ -3,7 +3,7 @@
Ask DeepWiki -PyPI Version +PyPI Version Pepy Total Downloads
Build @@ -319,7 +319,7 @@ usage: onvif [-h] [--host HOST] [--port PORT] [--username USERNAME] [--password [--cache {all,db,mem,none}] [--health-check-interval HEALTH_CHECK_INTERVAL] [--output OUTPUT] [--version] [service] [method] [params ...] -ONVIF Terminal Client — v0.2.5 +ONVIF Terminal Client — v0.2.6 https://github.com/nirsimetri/onvif-python positional arguments: @@ -401,7 +401,7 @@ Examples: ```bash -ONVIF Interactive Shell — v0.2.5 +ONVIF Interactive Shell — v0.2.6 https://github.com/nirsimetri/onvif-python Basic Commands: diff --git a/onvif/cli/interactive.py b/onvif/cli/interactive.py index 7bc5201..88c5d9d 100644 --- a/onvif/cli/interactive.py +++ b/onvif/cli/interactive.py @@ -194,7 +194,7 @@ def __init__(self, client: ONVIFClient, args): " / __ \\/ | / / | / / _/ ____/", " / / / / |/ /| | / // // /_ ", "/ /_/ / /| / | |/ // // __/ ", - "\\____/_/ |_/ |___/___/_/ v0.2.5", + "\\____/_/ |_/ |___/___/_/ v0.2.6", " ", ] @@ -1400,7 +1400,7 @@ def do_help(self, line): super().do_help(line) else: help_text = f""" -{colorize('ONVIF Interactive Shell — v0.2.5', 'cyan')}\n{colorize('https://github.com/nirsimetri/onvif-python', 'white')} +{colorize('ONVIF Interactive Shell — v0.2.6', 'cyan')}\n{colorize('https://github.com/nirsimetri/onvif-python', 'white')} {colorize('Basic Commands:', 'yellow')} capabilities, caps - Show device capabilities diff --git a/onvif/cli/main.py b/onvif/cli/main.py index 2003a9e..1bc5d11 100644 --- a/onvif/cli/main.py +++ b/onvif/cli/main.py @@ -22,7 +22,7 @@ def create_parser(): """Create argument parser for ONVIF CLI""" parser = argparse.ArgumentParser( prog="onvif", - description=f"{colorize('ONVIF Terminal Client', 'yellow')} — v0.2.5\nhttps://github.com/nirsimetri/onvif-python", + description=f"{colorize('ONVIF Terminal Client', 'yellow')} — v0.2.6\nhttps://github.com/nirsimetri/onvif-python", formatter_class=argparse.RawDescriptionHelpFormatter, epilog=f""" Examples: @@ -188,7 +188,7 @@ def main(): # Show ONVIF CLI version if args.version: - print(colorize("0.2.5", "yellow")) + print(colorize("0.2.6", "yellow")) sys.exit(0) # Handle product search diff --git a/pyproject.toml b/pyproject.toml index b17ccca..ea7d165 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "onvif-python" -version = "0.2.5" +version = "0.2.6" description = "A modern Python library for ONVIF-compliant devices" readme = "README.md" requires-python = ">=3.9" From 6c7ab48dd2f6fc300baf66fcdf922a7fbd146c13 Mon Sep 17 00:00:00 2001 From: kaburagisec Date: Sun, 14 Dec 2025 06:15:25 +0700 Subject: [PATCH 3/4] chore(wsdl): Update wsdl folders from remote (https://github.com/onvif/specs) --- .../wsdl/advancedsecurity.wsdl | 2 +- onvif/wsdl/ver10/device/wsdl/devicemgmt.wsdl | 115 ++++++++++++++++++ onvif/wsdl/ver10/schema/onvif.xsd | 21 ++++ onvif/wsdl/ver10/uplink/wsdl/uplink.wsdl | 4 +- 4 files changed, 139 insertions(+), 3 deletions(-) diff --git a/onvif/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl b/onvif/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl index a03000a..6d12711 100644 --- a/onvif/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl +++ b/onvif/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl @@ -750,7 +750,7 @@ - List of supported key algorithm like 'RSA' and 'ECC'. For a full list of definitions see tas:KeyAlgorithm. + List of supported key algorithm like 'RSA' and 'ECC'. For a full list of definitions see tas:KeyPairAlgorithm. diff --git a/onvif/wsdl/ver10/device/wsdl/devicemgmt.wsdl b/onvif/wsdl/ver10/device/wsdl/devicemgmt.wsdl index 4f2904a..fc0ccfe 100644 --- a/onvif/wsdl/ver10/device/wsdl/devicemgmt.wsdl +++ b/onvif/wsdl/ver10/device/wsdl/devicemgmt.wsdl @@ -272,6 +272,11 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO Supported hashing algorithms as part of HTTP and RTSP Digest authentication.Example: MD5,SHA-256 + + + Whenever set to an integer greater than zero, it signals that the device supports editable user roles. It indicates the maximum number of editable user roles. + + @@ -979,6 +984,53 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2619,6 +2671,24 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + + + + + + + + + + + + + + + + + @@ -3220,6 +3290,24 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + This operation returns the editable user levels configured in the device. Whenever an editable + user level is passed in the request, information only about that level is returned. + + + + + This operation configures an editable user level in the device. If the level + passed in UserRole already exists in the device, its configuration is overwritten. Otherwise, + a new editable user level is created. + + + + + This operation deletes an editable user level in the device. + + + This operation returns the configured remote user (if any). A device supporting remote user handling shall support this operation. The user is only valid for the WS-UserToken profile or @@ -4018,6 +4106,33 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/onvif/wsdl/ver10/schema/onvif.xsd b/onvif/wsdl/ver10/schema/onvif.xsd index bad3047..debc96b 100644 --- a/onvif/wsdl/ver10/schema/onvif.xsd +++ b/onvif/wsdl/ver10/schema/onvif.xsd @@ -4141,6 +4141,22 @@ decoding .A decoder shall decode every data it receives (according to its capabi + + + + + Name of the editable user level. + + + + + Names of the permitted function for the editable user level. The names must be prepended by the namespace prefix and colon. + + + + + + @@ -4165,6 +4181,11 @@ decoding .A decoder shall decode every data it receives (according to its capabi + + + The names of the roles assigned to the user. + + diff --git a/onvif/wsdl/ver10/uplink/wsdl/uplink.wsdl b/onvif/wsdl/ver10/uplink/wsdl/uplink.wsdl index 8505d0e..5c7c307 100644 --- a/onvif/wsdl/ver10/uplink/wsdl/uplink.wsdl +++ b/onvif/wsdl/ver10/uplink/wsdl/uplink.wsdl @@ -86,8 +86,8 @@ IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FO ID of the certificate to be used for client authentication. - - Authorization level that will be assigned to the uplink connection. + + List of authorization levels and roles that will be used to restrict the commands that will be accepted through the uplink connection. Current connection status (see tup:ConnectionStatus for possible values). From b2d07a306581fbb3b5d6deb51e124db81fea881a Mon Sep 17 00:00:00 2001 From: kaburagisec Date: Sun, 14 Dec 2025 06:21:03 +0700 Subject: [PATCH 4/4] feat(devicemgmt): Add user role management methods to Device Class --- onvif/services/devicemgmt.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/onvif/services/devicemgmt.py b/onvif/services/devicemgmt.py index 8a91175..fabec9d 100644 --- a/onvif/services/devicemgmt.py +++ b/onvif/services/devicemgmt.py @@ -104,6 +104,15 @@ def GetRemoteUser(self): def SetRemoteUser(self, RemoteUser=None): return self.operator.call("SetRemoteUser", RemoteUser=RemoteUser) + def GetUserRoles(self, UserRole=None): + return self.operator.call("GetUserRoles", UserRole=UserRole) + + def SetUserRole(self, UserRole): + return self.operator.call("SetUserRole", UserRole=UserRole) + + def DeleteUserRole(self, UserRole): + return self.operator.call("DeleteUserRole", UserRole=UserRole) + def GetUsers(self): return self.operator.call("GetUsers")