Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.61k stars 2.83k forks source link

RFC: How do you handle different clouds? #656

Closed boumenot closed 8 years ago

boumenot commented 8 years ago

I opened an issue against the Azure/go-autorest team to better support Azure Stack. One of the questions was how do other SDKs intend to support Azure Stack. (I am not sure if this is the right place to log the issue or not.)

The go-autorest library has a type to encapsulate the various links that are required to support a different cloud environment. I could not find anything equivalent in the Python SDK. I do see comments where a Boolean can be passed to indicate China, but nothing to indicate the other supported cloud, e.g. US Government. Is Azure Stack still something you're thinking about? The user's request for Azure Stack was a preparatory request because he does not have an immediate need yet.

lmazuel commented 8 years ago

Hi @boumenot

You can do it by changing the base_url of each client and overriding the authentication endpoint (or use ADAL 0.3.0 to get the token). However, I agree that it's not convenient. We have a task in our backlog to support an "Environment". An "Environment" is inspired of what does NodeJS right now: https://github.com/Azure/autorest/blob/master/ClientRuntimes/NodeJS/ms-rest-azure/lib/azureEnvironment.js

We will provide static environment for China, Governement, etc.and allow the user to define one.

This is also related to this issue: https://github.com/Azure/autorest/issues/1082

boumenot commented 8 years ago

Thank you!

lmazuel commented 7 years ago

Doc for multi-cloud here: http://azure-sdk-for-python.readthedocs.io/en/latest/multicloud.html