From 8e7312aac8f0fdf537eb771078639b565b2ba9e3 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Tue, 15 Sep 2026 18:01:09 +0100 Subject: [PATCH] Add san-ip to the secrets value This value was missing in the secrets in the backend, and wouldn't configure the dellpowerstore. This will ensure that the san-ip is in the secrets, and allow it to move forward. Signed-off-by: Arif Ali --- .../sunbeam/storage/backends/dellpowerstore/backend.py | 1 + .../unit/sunbeam/storage/backends/test_dellpowerstore.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/sunbeam-python/sunbeam/storage/backends/dellpowerstore/backend.py b/sunbeam-python/sunbeam/storage/backends/dellpowerstore/backend.py index 4ca2a6f77..0fa25924e 100644 --- a/sunbeam-python/sunbeam/storage/backends/dellpowerstore/backend.py +++ b/sunbeam-python/sunbeam/storage/backends/dellpowerstore/backend.py @@ -28,6 +28,7 @@ class DellPowerstoreConfig(StorageBackendConfig): san_ip: Annotated[ str, Field(description="Dell PowerStore management IP"), + SecretDictField(field="san-ip"), ] san_login: Annotated[ str, diff --git a/sunbeam-python/tests/unit/sunbeam/storage/backends/test_dellpowerstore.py b/sunbeam-python/tests/unit/sunbeam/storage/backends/test_dellpowerstore.py index 1cd8bb040..c6d346901 100644 --- a/sunbeam-python/tests/unit/sunbeam/storage/backends/test_dellpowerstore.py +++ b/sunbeam-python/tests/unit/sunbeam/storage/backends/test_dellpowerstore.py @@ -92,6 +92,15 @@ def test_dellpowerstore_san_credentials_are_secret(self, backend): config_class = backend.config_type() + # Check san_ip is marked as secret + ip_field = config_class.model_fields.get("san_ip") + assert ip_field is not None + has_secret_marker = any( + isinstance(m, SecretDictField) for m in ip_field.metadata + ) + + assert has_secret_marker, "san_ip` should be marked as secret" + # Check san_login is marked as secret username_field = config_class.model_fields.get("san_login") assert username_field is not None