def _parse_imgadm_sources(imgadm_sources):
    """imgadm sources -j output can produce different output depending on SmartOS version (list of strings or dicts)"""
    if not imgadm_sources:
        return []

    if isinstance(imgadm_sources[-1], dict):
        return [src['url'] for src in imgadm_sources]
    else:
        return imgadm_sources