-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
Followup to #5258. Allocated query would have to return a breakdown by type for both IPv4 and IPv6. Should be quite easy: do 6 counts instead of 2 and add AND ip_kind = 'ephemeral' etc. to the WHERE clauses.
omicron/nexus/db-queries/src/db/datastore/ip_pool.rs
Lines 353 to 360 in f8c394f
| .select(( | |
| sql::<BigInt>( | |
| "count(distinct ip) FILTER (WHERE family(ip) = 4)", | |
| ), | |
| sql::<BigInt>( | |
| "count(distinct ip) FILTER (WHERE family(ip) = 6)", | |
| ), | |
| )) |
I think the API should still continue to return the total allocated count in addition to the breakdown by type. One of the following:
allocated_ephemeral
allocated_floating
allocated_snat
allocated
capacity
allocated: {
total
ephemeral
floating
snat
}
capacity
Metadata
Metadata
Assignees
Labels
No labels