15
15
16
16
from application_sdk .clients import ClientInterface
17
17
from application_sdk .clients .azure .azure_auth import AzureAuthProvider
18
- from application_sdk .clients .azure .azure_services import AzureStorageClient
19
18
from application_sdk .common .credential_utils import resolve_credentials
20
19
from application_sdk .common .error_codes import ClientError
21
20
from application_sdk .observability .logger_adaptor import get_logger
@@ -28,7 +27,7 @@ class AzureClient(ClientInterface):
28
27
Main Azure client for the application-sdk framework.
29
28
30
29
This client provides a unified interface for connecting to and interacting
31
- with Azure Storage services. It supports Service Principal authentication
30
+ with Azure services. It supports Service Principal authentication
32
31
and provides service-specific subclients for different Azure services.
33
32
34
33
Attributes:
@@ -136,38 +135,13 @@ async def close(self) -> None:
136
135
except Exception as e :
137
136
logger .error (f"Error closing Azure client: { str (e )} " )
138
137
139
- async def get_storage_client (self ) -> AzureStorageClient :
140
- """
141
- Get Azure Storage service client.
142
-
143
- Returns:
144
- AzureStorageClient: Configured Azure Storage client.
145
-
146
- Raises:
147
- ClientError: If client is not loaded or storage client creation fails.
148
- """
149
- if not self ._connection_health :
150
- raise ClientError (f"{ ClientError .CLIENT_AUTH_ERROR } : Client not loaded" )
151
-
152
- if "storage" not in self ._services :
153
- try :
154
- self ._services ["storage" ] = AzureStorageClient (
155
- credential = self .credential , ** self ._kwargs
156
- )
157
- await self ._services ["storage" ].load (self .resolved_credentials )
158
- except Exception as e :
159
- logger .error (f"Failed to create storage client: { str (e )} " )
160
- raise ClientError (f"{ ClientError .CLIENT_AUTH_ERROR } : { str (e )} " )
161
-
162
- return self ._services ["storage" ]
163
-
164
138
async def get_service_client (self , service_type : str ) -> Any :
165
139
"""
166
140
Get a service client by type.
167
141
168
142
Args:
169
143
service_type (str): Type of service client to retrieve.
170
- Supported values: 'storage' .
144
+ Currently no services are supported .
171
145
172
146
Returns:
173
147
Any: The requested service client.
@@ -176,14 +150,7 @@ async def get_service_client(self, service_type: str) -> Any:
176
150
ValueError: If service_type is not supported.
177
151
ClientError: If client creation fails.
178
152
"""
179
- service_mapping = {
180
- "storage" : self .get_storage_client ,
181
- }
182
-
183
- if service_type not in service_mapping :
184
- raise ValueError (f"Unsupported service type: { service_type } " )
185
-
186
- return await service_mapping [service_type ]()
153
+ raise ValueError (f"Unsupported service type: { service_type } " )
187
154
188
155
async def health_check (self ) -> Dict [str , Any ]:
189
156
"""
0 commit comments