-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding in some functionality to use different clouds (#28528)
* Adding in some functionality to use different clouds This support is needed for the air gapped environments. There are three ways to add a new cloud environment. These were all taken from examples in the v1 sdk. 1) The SDK will look for a default configuration file and try to find cloud environments in there. 2) If you set an environment variable called ARM_METADATA_URL, it will look there for cloud configurations. If you do not set this, it will use a default URL in the _azure_environments.py file to find them. 3) The SDK exposes two new functions, add_cloud which will add the new configuration to the configuration file mentioned in #1, and update_cloud which will update the added configuration. * Removing some of the functionality, only ARM check remains * Adding unit test for new environments functionality * fixed tests with mock * removed print statement * removed commented code * removed print statements (oops) * fixed tests and removed comments * Fixing a testing bug * Fixing a misspelled word * Changing how we reach out to ARM, als fixing some pylint * Fixing more lint errors * Fixing more lint errors * updated code per suggestions in PR * fixed typo in warning * added registry_endpoint to metadata url, also added tests for making sure all endpointurls are registered * updated how the registry discovery endpoint is created. Uses a default region but region can be updated with environment variable * fixed linting errors * moved discovery url logic around to make sure it's not overwriting public regions * Fixing small pylint errors * Moving over to using HttpPipeline instead of requests * fixed up based on comments in the PR * fixed broken unit tests and mocked correctly * Fixing pylint issues --------- Co-authored-by: Ronald Shaw <ronaldshaw@microsoft.com>
- Loading branch information
1 parent
77ae304
commit c3b7b30
Showing
3 changed files
with
180 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters