'Returns list of security group rules owned by tenant.'

def list(self, context, names=None, ids=None, project=None, search_opts=None):

    neutron = neutronapi.get_client(context)
    params = {}
    search_opts = (search_opts if search_opts else {})
    if names:
        params['name'] = names
    if ids:
        params['id'] = ids
    list_all_tenants = (context.is_admin and ('all_tenants' in search_opts) and (not any([names, ids])))
    if (project and (not list_all_tenants)):
        params['tenant_id'] = project
    try:
        security_groups = neutron.list_security_groups(**params).get('security_groups')
    except n_exc.NeutronClientException:
        with excutils.save_and_reraise_exception():
            LOG.exception(_LE('Neutron    Error    getting    security    groups'))
    converted_rules = []
    for security_group in security_groups:
        converted_rules.append(self._convert_to_nova_security_group_format(security_group))
    return converted_rules
