.. versionadded:: 2019.2.0

    Get a circuit provider with a given name and optional ASN.

    name
        The name of the circuit provider
    asn
        The ASN of the circuit provider

    CLI Example:

    .. code-block:: bash

        salt myminion netbox.get_circuit_provider Telia 1299

def get_circuit_provider(name, asn=None):
    '''
    .. versionadded:: 2019.2.0

    Get a circuit provider with a given name and optional ASN.

    name
        The name of the circuit provider
    asn
        The ASN of the circuit provider

    CLI Example:

    .. code-block:: bash

        salt myminion netbox.get_circuit_provider Telia 1299
    '''
    if asn:
        nb_circuit_provider = get_('circuits', 'providers', asn=asn)
    else:
        nb_circuit_provider = get_('circuits', 'providers', name=name)
    return nb_circuit_provider