def conn_az(cred, crid):
    """Establish connection to Azure service."""
    driver = get_driver(Provider.AZURE_ARM)
    try:
        az_obj = driver(tenant_id=cred['az_tenant_id'],
                        subscription_id=cred['az_sub_id'],
                        key=cred['az_app_id'],
                        secret=cred['az_app_sec'])
    except SSLError as e:
        abort_err("\r SSL Error with Azure: {}".format(e))
    except InvalidCredsError as e:
        abort_err("\r Error with Azure Credentials: {}".format(e))
    return {crid: az_obj}
def conn_az ( cred , crid ) : driver = get_driver ( Provider . AZURE_ARM ) try : az_obj = driver ( tenant_id = cred [ 'az_tenant_id' ] , subscription_id = cred [ 'az_sub_id' ] , key = cred [ 'az_app_id' ] , secret = cred [ 'az_app_sec' ] ) except SSLError as e : abort_err ( "\r SSL Error with Azure: {}" . format ( e ) ) except InvalidCredsError as e : abort_err ( "\r Error with Azure Credentials: {}" . format ( e ) ) return { crid : az_obj }
Establish connection to Azure service.