Commit 3f32bdf
Alicja Filipek
quota: Fix incorrect keypair usage in show command
Before this change, the 'quota show' command displayed incorrect
keypair usage. While keypairs are listed under compute quotas, the
Nova compute API does not actually gather or track keypair usage data
on a per-project basis. As the result keypair usage output was always 0.
Resolve this by checking whether the current user matches the target
project scope. If the project IDs match, the code queries the compute
SDK directly to retrieve the active keypair count for that user.
Change-Id: I5592e1b797b4d18c6c2aae48580ff6f014ffd214
Signed-off-by: Alicja Filipek <alicja.filipek@cleura.com>1 parent 0519e81 commit 3f32bdf
3 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
800 | 800 | | |
801 | 801 | | |
802 | 802 | | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
803 | 807 | | |
804 | 808 | | |
805 | 809 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1216 | 1232 | | |
1217 | 1233 | | |
1218 | 1234 | | |
| |||
0 commit comments