File: rate-everyone.patch

package info (click to toggle)
cloudkitty 23.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,532 kB
  • sloc: python: 21,803; sh: 528; makefile: 226; pascal: 54
file content (25 lines) | stat: -rw-r--r-- 1,187 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Rate everyone
 The Keystone fetcher looks at a "rating" role to see if a project should
 be rated or not. Unfortunately, this doesn't work, and projects that have
 the rating role aren't getting rated.
 .
 This patch therefore removes the rating role look-up, and just rates everyone
 with an account in the OpenStack cloud, and rates everyone. This also
 simplifies the user management where one doesn't have to manage the rating
 role anymore.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2021-03-10

--- cloudkitty-13.0.0.orig/cloudkitty/fetcher/keystone.py
+++ cloudkitty-13.0.0/cloudkitty/fetcher/keystone.py
@@ -77,6 +77,6 @@ class KeystoneFetcher(fetcher.BaseFetche
             roles = getattr(self.admin_ks.roles, role_func)(
                 **{'user': my_user_id,
                    tenant_attr: tenant})
-            if 'rating' not in [role.name for role in roles]:
-                tenant_list.remove(tenant)
+#            if 'rating' not in [role.name for role in roles]:
+#                tenant_list.remove(tenant)
         return [tenant.id for tenant in tenant_list]