def create_storage_clients(): # type: (None) -> tuple """Create storage clients :rtype: tuple :return: blob_client, table_client, queue_client """ account_name = storage.get_storageaccount() account_key = storage.get_storageaccount_key() endpoint_suffix = storage.get_storageaccount_endpoint() blob_client = azureblob.BlockBlobService( account_name=account_name, account_key=account_key, endpoint_suffix=endpoint_suffix, ) table_client = azuretable.TableService( account_name=account_name, account_key=account_key, endpoint_suffix=endpoint_suffix, ) queue_client = azurequeue.QueueService( account_name=account_name, account_key=account_key, endpoint_suffix=endpoint_suffix, ) return blob_client, table_client, queue_client
def create_storage_clients(): # type: (None) -> tuple """Create storage clients :rtype: tuple :return: blob_client, table_client, queue_client """ account_name = storage.get_storageaccount() account_key = storage.get_storageaccount_key() if account_key is None: raise RuntimeError( 'No storage account key provided for storage account {}. If ' 'accessing via AAD, ensure that a subscription id is specified ' 'under management in the credentials configuration.'.format( account_name)) endpoint_suffix = storage.get_storageaccount_endpoint() blob_client = azureblob.BlockBlobService( account_name=account_name, account_key=account_key, endpoint_suffix=endpoint_suffix, ) table_client = azuretable.TableService( account_name=account_name, account_key=account_key, endpoint_suffix=endpoint_suffix, ) queue_client = azurequeue.QueueService( account_name=account_name, account_key=account_key, endpoint_suffix=endpoint_suffix, ) return blob_client, table_client, queue_client