

def index(self, req):
    'Returns a list of security groups'
    context = req.environ['nova.context']
    self.compute_api.ensure_default_security_group(context)
    groups = db.security_group_get_by_project(context, context.project_id)
    limited_list = common.limited(groups, req)
    result = [self._format_security_group(groups, group) for group in limited_list]
    return {
        'security_groups': list(sorted(result, key=(lambda k: (k['tenant_id'], k['name'])))),
    }

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/contrib/security_groups.py SecurityGroupController.index/VarMisuse@63/96 `context`->`groups`