From 09484d2008f18e12c7ce1d47570981896a1dca16 Mon Sep 17 00:00:00 2001 From: panfengxue Date: Wed, 31 Jul 2024 14:36:44 -0700 Subject: [PATCH] remove exception logic for service principal key --- lisa/sut_orchestrator/azure/platform_.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lisa/sut_orchestrator/azure/platform_.py b/lisa/sut_orchestrator/azure/platform_.py index 200b7aa2e..703b0b7c0 100644 --- a/lisa/sut_orchestrator/azure/platform_.py +++ b/lisa/sut_orchestrator/azure/platform_.py @@ -335,15 +335,10 @@ class AzurePlatformSchema: add_secret(self.service_principal_tenant_id, mask=PATTERN_GUID) if self.subscription_id: add_secret(self.subscription_id, mask=PATTERN_GUID) - - if self.service_principal_client_id or self.service_principal_key: - add_secret(self.service_principal_client_id, mask=PATTERN_GUID) + if self.service_principal_key: add_secret(self.service_principal_key) - if not self.service_principal_client_id or not self.service_principal_key: - raise LisaException( - "service_principal_client_id and service_principal_key " - "should be specified either both or not." - ) + if self.service_principal_client_id: + add_secret(self.service_principal_client_id, mask=PATTERN_GUID) @property def cloud(self) -> Cloud: