Skip to content

IP pool utilization: break down by floating, ephemeral, SNAT #5332

@david-crespo

Description

@david-crespo

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.

.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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions