'Returns the vifs associated with an instance.'

def get_vifs_by_instance(self, context, instance_id):

    instance = objects.Instance.get_by_id(context, instance_id)
    LOG.debug('Get    VIFs    for    instance', instance=instance)
    vifs = objects.VirtualInterfaceList.get_by_instance_uuid(context, instance.uuid)
    for vif in vifs:
        if (vif.network_id is not None):
            network = self._get_network_by_id(context, vif.network_id)
            vif.net_uuid = network.uuid
    return [dict(vif) for vif in vifs]
