remove exception logic for service principal key

This commit is contained in:
panfengxue 2024-07-31 14:36:44 -07:00 коммит произвёл LiliDeng
Родитель 0d14e557b6
Коммит 09484d2008
1 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -335,15 +335,10 @@ class AzurePlatformSchema:
add_secret(self.service_principal_tenant_id, mask=PATTERN_GUID) add_secret(self.service_principal_tenant_id, mask=PATTERN_GUID)
if self.subscription_id: if self.subscription_id:
add_secret(self.subscription_id, mask=PATTERN_GUID) add_secret(self.subscription_id, mask=PATTERN_GUID)
if self.service_principal_key:
if self.service_principal_client_id or self.service_principal_key:
add_secret(self.service_principal_client_id, mask=PATTERN_GUID)
add_secret(self.service_principal_key) add_secret(self.service_principal_key)
if not self.service_principal_client_id or not self.service_principal_key: if self.service_principal_client_id:
raise LisaException( add_secret(self.service_principal_client_id, mask=PATTERN_GUID)
"service_principal_client_id and service_principal_key "
"should be specified either both or not."
)
@property @property
def cloud(self) -> Cloud: def cloud(self) -> Cloud: