'Returns all network info related to an instance.'

def get_instance_nw_info(self, context, instance, **kwargs):

    with lockutils.lock(('refresh_cache-%s' % instance.uuid)):
        result = self._get_instance_nw_info(context, instance, **kwargs)
        update_cells = kwargs.get('update_cells', False)
        update_instance_cache_with_nw_info(self, context, instance, nw_info=result, update_cells=update_cells)
    return result
