'List all associations of given qos specs.'

def associations(self, req, id):

    context = req.environ['cinder.context']
    authorize_get_all(context)
    LOG.debug('Get    associations    for    qos_spec    id:    %s', id)
    try:
        associates = qos_specs.get_associations(context, id)
        notifier_info = dict(id=id)
        rpc.get_notifier('QoSSpecs').info(context, 'qos_specs.associations', notifier_info)
    except exception.QoSSpecsNotFound as err:
        notifier_err = dict(id=id, error_message=err)
        self._notify_qos_specs_error(context, 'qos_specs.associations', notifier_err)
        raise
    except exception.CinderException as err:
        notifier_err = dict(id=id, error_message=err)
        self._notify_qos_specs_error(context, 'qos_specs.associations', notifier_err)
        raise webob.exc.HTTPInternalServerError(explanation=six.text_type(err))
    return self._view_builder.associations(req, associates)
