fixed passing non-default base_url from explicitly set cloud_environment (#40225)

pull/34344/head
Timur Evdokimov 7 years ago committed by Yunge Zhu
parent edb1735ca0
commit c29fe66edf

@ -926,6 +926,10 @@ class AzureRMModuleBase(object):
client_argspec = inspect.getargspec(client_type.__init__)
if not base_url:
# most things are resource_manager, don't make everyone specify
base_url = self._cloud_environment.endpoints.resource_manager
client_kwargs = dict(credentials=self.azure_credentials, subscription_id=self.subscription_id, base_url=base_url)
api_profile_dict = {}
@ -933,10 +937,6 @@ class AzureRMModuleBase(object):
if self.api_profile:
api_profile_dict = self.get_api_profile(client_type.__name__, self.api_profile)
if not base_url:
# most things are resource_manager, don't make everyone specify
base_url = self._cloud_environment.endpoints.resource_manager
# unversioned clients won't accept profile; only send it if necessary
# clients without a version specified in the profile will use the default
if api_profile_dict and 'profile' in client_argspec.args:

Loading…
Cancel
Save