import requests
import logging


def fetch_provider_urls(plan_url):
    """Fetch all provider urls listed on a plan's url."""
    response = requests.get(plan_url)
    response.raise_for_status()
    response_json = response.json()
    if 'provider_urls' in response_json:
        return response_json['provider_urls']
    logging.warning('No provider URLs available for plan url: {}'.format(plan_url))