Merge pull request #47012 from terminalmage/issue46953

Azure: ensure subscription_id is a str type
This commit is contained in:
Nicole Thomas 2018-04-11 09:57:07 -04:00 committed by GitHub
commit 79347f108a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 9 deletions

View File

@ -65,6 +65,7 @@ import salt.config as config
import salt.utils.cloud
import salt.utils.data
import salt.utils.files
import salt.utils.stringutils
import salt.utils.yaml
from salt.utils.versions import LooseVersion
from salt.ext import six
@ -197,9 +198,11 @@ def get_conn(Client=None):
if Client is None:
Client = ComputeManagementClient
subscription_id = config.get_cloud_config_value(
'subscription_id',
get_configured_provider(), __opts__, search_global=False
subscription_id = salt.utils.stringutils.to_str(
config.get_cloud_config_value(
'subscription_id',
get_configured_provider(), __opts__, search_global=False
)
)
tenant = config.get_cloud_config_value(

View File

@ -49,6 +49,7 @@ import time
import salt.config as config
from salt.exceptions import SaltCloudSystemExit
import salt.utils.cloud
import salt.utils.stringutils
import salt.utils.yaml
# Import 3rd-party libs
@ -117,9 +118,11 @@ def get_conn():
'certificate_path',
get_configured_provider(), __opts__, search_global=False
)
subscription_id = config.get_cloud_config_value(
'subscription_id',
get_configured_provider(), __opts__, search_global=False
subscription_id = salt.utils.stringutils.to_str(
config.get_cloud_config_value(
'subscription_id',
get_configured_provider(), __opts__, search_global=False
)
)
management_host = config.get_cloud_config_value(
'management_host',
@ -3369,9 +3372,11 @@ def query(path, method='GET', data=None, params=None, header_dict=None, decode=T
'certificate_path',
get_configured_provider(), __opts__, search_global=False
)
subscription_id = config.get_cloud_config_value(
'subscription_id',
get_configured_provider(), __opts__, search_global=False
subscription_id = salt.utils.stringutils.to_str(
config.get_cloud_config_value(
'subscription_id',
get_configured_provider(), __opts__, search_global=False
)
)
management_host = config.get_cloud_config_value(
'management_host',