def get_cached_vifs_with_vlan(network_info):
    """Generates a dict from a list of VIFs that has a vlan tag, with
    MAC, VLAN as a key, value.
    """
    if network_info is None:
        return {}
    return {vif['address']: vif['details']['vlan'] for vif in network_info
                            if vif.get('details', {}).get('vlan')}