Commit 75831be
release: v1.0.3 — CloudKitty (rating) support
New ``orca rating`` command group covering CloudKitty. Validated live
against Infomaniak (dc3-a, non-admin user).
End-user surface (no admin role needed):
- rating info — CloudKitty collector + metrics config
- rating metric-list / metric-show — rated metrics catalogue
- rating summary — project rating total, with --begin/--end/--groupby/
--filters; default window = start of month → now
- rating dataframes — raw rated records; tries /v2/dataframes then
falls back to /v1/storage/dataframes (Infomaniak exposes only v1)
- rating quote — pre-deployment price estimate via POST to
/v1/rating/quote
Admin surface:
- rating module-list / module-show / module-enable / module-disable /
module-set-priority (hashmap / pyscripts / noop). module-* uses a
fetch-merge-PUT pattern because CloudKitty PUT requires the full
representation.
- rating hashmap service-list/create/delete
- rating hashmap field-list/create/delete
- rating hashmap mapping-list/create/delete (value → price; flat/rate;
field- or service-level)
- rating hashmap threshold-list/create/delete (tiered pricing)
- rating hashmap group-list/create/delete
Additional fixes discovered during the live test:
- rating metric-show: path is /v1/info/metrics/{id} (plural);
CloudKitty returns 405 on the singular /v1/info/metric/{id}
- validate_id: pass through None so the callback is safe on optional
Click parameters (needed by rating-hashmap --field-id/--service-id/
--group-id filters)
Coverage: rating.py at 95 %; total coverage 85.73 % (2167 tests).1 parent 151b96a commit 75831be
7 files changed
Lines changed: 990 additions & 2 deletions
File tree
- orca_cli
- commands
- core
- tests
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
334 | 339 | | |
335 | 340 | | |
336 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments