Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-nethsm for openSUSE:Factory 
checked in at 2025-11-09 21:10:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nethsm (Old)
 and      /work/SRC/openSUSE:Factory/.python-nethsm.new.1980 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-nethsm"

Sun Nov  9 21:10:24 2025 rev:9 rq:1316696 version:2.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nethsm/python-nethsm.changes      
2025-10-21 11:17:56.454627074 +0200
+++ /work/SRC/openSUSE:Factory/.python-nethsm.new.1980/python-nethsm.changes    
2025-11-09 21:12:56.091774585 +0100
@@ -1,0 +2,6 @@
+Fri Nov  7 13:20:24 UTC 2025 - Johannes Kastl 
<[email protected]>
+
+- update to 2.0.1:
+  * Add support for unauthenticated shutdown.
+
+-------------------------------------------------------------------

Old:
----
  nethsm-2.0.0.tar.gz

New:
----
  nethsm-2.0.1.tar.gz

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

Other differences:
------------------
++++++ python-nethsm.spec ++++++
--- /var/tmp/diff_new_pack.P84mit/_old  2025-11-09 21:12:56.607796166 +0100
+++ /var/tmp/diff_new_pack.P84mit/_new  2025-11-09 21:12:56.611796334 +0100
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-nethsm
-Version:        2.0.0
+Version:        2.0.1
 Release:        0
 Summary:        Python Library to manage NetHSM(s)
 License:        Apache-2.0
@@ -142,6 +142,9 @@
 IGNORED_CHECKS="${IGNORED_CHECKS} or test_ca_certs_valid"
 IGNORED_CHECKS="${IGNORED_CHECKS} or test_move_key"
 IGNORED_CHECKS="${IGNORED_CHECKS} or test_list_keys_prefix"
+IGNORED_CHECKS="${IGNORED_CHECKS} or test_unprovision_shutdown"
+IGNORED_CHECKS="${IGNORED_CHECKS} or test_locked_shutdown"
+
 %pytest -k "not (${IGNORED_CHECKS})"
 
 %files %{python_files}

++++++ nethsm-2.0.0.tar.gz -> nethsm-2.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nethsm-sdk-py-2.0.0/CHANGELOG.md 
new/nethsm-sdk-py-2.0.1/CHANGELOG.md
--- old/nethsm-sdk-py-2.0.0/CHANGELOG.md        2025-10-15 15:24:21.000000000 
+0200
+++ new/nethsm-sdk-py-2.0.1/CHANGELOG.md        2025-11-06 16:19:25.000000000 
+0100
@@ -4,7 +4,13 @@
 
 -
 
-[All Changes](https://github.com/Nitrokey/nethsm-sdk-py/compare/v2.0.0...HEAD)
+[All Changes](https://github.com/Nitrokey/nethsm-sdk-py/compare/v2.0.1...HEAD)
+
+## [v2.0.1](https://github.com/Nitrokey/nethsm-sdk-py/releases/tag/v2.0.1) 
(2025-11-06)
+
+- Add support for unauthenticated shutdown.
+
+[All 
Changes](https://github.com/Nitrokey/nethsm-sdk-py/compare/v2.0.0...v2.0.1)
 
 ## [v2.0.0](https://github.com/Nitrokey/nethsm-sdk-py/releases/tag/v2.0.0) 
(2025-10-15)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nethsm-sdk-py-2.0.0/nethsm/__init__.py 
new/nethsm-sdk-py-2.0.1/nethsm/__init__.py
--- old/nethsm-sdk-py-2.0.0/nethsm/__init__.py  2025-10-15 15:24:21.000000000 
+0200
+++ new/nethsm-sdk-py-2.0.1/nethsm/__init__.py  2025-11-06 16:19:25.000000000 
+0100
@@ -8,7 +8,7 @@
 # copied, modified, or distributed except according to those terms.
 """Python Library to manage NetHSM(s)."""
 
-__version__ = "2.0.0"
+__version__ = "2.0.1"
 
 import binascii
 import contextlib
@@ -1748,7 +1748,10 @@
 
     def shutdown(self) -> None:
         try:
-            self._get_api().system_shutdown_post()
+            if self.auth:
+                self._get_api().system_shutdown_post()
+            else:
+                self._get_api().system_shutdown_post(security_index=1)
         except Exception as e:
             _handle_exception(e)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nethsm-sdk-py-2.0.0/tests/test_nethsm_system.py 
new/nethsm-sdk-py-2.0.1/tests/test_nethsm_system.py
--- old/nethsm-sdk-py-2.0.0/tests/test_nethsm_system.py 2025-10-15 
15:24:21.000000000 +0200
+++ new/nethsm-sdk-py-2.0.1/tests/test_nethsm_system.py 2025-11-06 
16:19:25.000000000 +0100
@@ -1,6 +1,8 @@
 import datetime
 import os
+from typing import Iterator
 
+import pytest
 from conftest import Constants as C
 from test_nethsm_keys import generate_key
 from utilities import (
@@ -8,11 +10,13 @@
     add_user,
     connect,
     encrypt_rsa,
+    lock,
     provision,
     set_backup_passphrase,
     update,
 )
 
+import nethsm as nethsm_sdk
 from nethsm import Base64, NetHSM, NetHSMError
 from nethsm.backup import EncryptedBackup
 
@@ -25,6 +29,17 @@
 """
 
 
[email protected](scope="module")
+def nethsm_no_provision_no_auth(container: Container) -> Iterator[NetHSM]:
+    """Start Docker container with Nethsm image and connect to Nethsm
+
+    This Pytest Fixture will run before the tests to provide the tests with
+    a nethsm instance via Docker container"""
+
+    with nethsm_sdk.connect(C.HOST, verify_tls=C.VERIFY_TLS) as nethsm:
+        yield nethsm
+
+
 """######################### Start of Tests #########################"""
 
 
@@ -219,6 +234,18 @@
     nethsm.reboot()
 
 
+def test_unprovision_shutdown(
+    container: Container, nethsm_no_provision_no_auth: NetHSM
+) -> None:
+    """Shutdown a NetHSM instance."""
+    container.restart()
+
+    assert nethsm_no_provision_no_auth.get_state().value == "Unprovisioned"
+    assert nethsm_no_provision_no_auth.auth is None
+
+    nethsm_no_provision_no_auth.shutdown()
+
+
 def test_provision_shutdown(container: Container, nethsm: NetHSM) -> None:
     """Shutdown a NetHSM instance.
 
@@ -229,3 +256,15 @@
     provision(nethsm)
 
     nethsm.shutdown()
+
+
+def test_locked_shutdown(container: Container, nethsm: NetHSM) -> None:
+    """Shutdown a NetHSM instance."""
+    container.restart()
+
+    provision(nethsm)
+    nethsm.auth = None
+    assert nethsm.auth is None
+    lock(nethsm)
+
+    nethsm.shutdown()

Reply via email to