def get_zones():
    """
    Retrieve authoritative zones from the NS1 API and return a list of zones

    :raise: Exception
    :return: list of Zone Objects
    """
    _check_conf()
    path = f'{"/v1/zones"}'
    zones = []
    function = inspect.currentframe().f_code.co_name
    log_data = {
        "function": function
    }
    try:
        records = _get(path)
        log_data["message"] = "Retrieved Zones Successfully"
        current_app.logger.debug(log_data)
    except Exception as err:
        capture_exception()
        log_data["message"] = "Failed to Retrieve Zone Data"
        log_data["error"] = err
        current_app.logger.debug(log_data)
        raise
    for record in records:
        zone = record['zone']
        if record['primary']['enabled']:
            zones.append(zone)
    return zones

    Retrieve authoritative zones from the NS1 API and return a list of zones

    :raise: Exception
    :return: list of Zone Objects
    
lemur/plugins/lemur_acme/nsone.py