Affects Version/s: None
Fix Version/s: None
There's a popular emulator for Azure Storage called Azurite. I tried to configure libcloud to talk to Azurite like so:
from libcloud.storage.types import Provider
from libcloud.storage.providers import get_driver
# the secret and account name are defined in the azurite documentation
key = 'devstoreaccount1'
secret = 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=='
# run azurite via `docker run -e executable=blob -d -t -p 10000:10000 -v arafato/azurite`
host = 'localhost:10000'
AzureBlobs = get_driver(Provider.AZURE_BLOBS)
driver = AzureBlobs(key, secret, host=host, secure=False)
The root cause is that the AzureBlobsStorageDriver currently assumes that the storage accounts are always going to be identified via the hostname (e.g. someaccount.blob.core.windows.net) but Azurite expects the accounts to be identified via a path prefix (e.g. /someaccount).
Fixing this will require a change in the driver to add a prefix to all action URLs if a custom host is set. I believe it's valuable to make this change since it would enable the Azure Blobs driver in libcloud to be used more easily for automated integration testing where developers don't necessarily want to talk to a live Azure Storage account. I have a sample patch for this issue at CatalystCode/libcloud@1037_fix-azurite.
I suspect that also the new Blob Storage on IoT edge will see the same kinds of errors since it also identifies accounts by URL prefix instead of hostname.