diff --git a/utils/consts.go b/utils/consts.go index 0da9d6c84..431f14737 100644 --- a/utils/consts.go +++ b/utils/consts.go @@ -807,6 +807,7 @@ const ( MetaFD = "*fd" SortingData = "SortingData" ProfileID = "ProfileID" + PoolID = "PoolID" SortedRoutes = "SortedRoutes" MetaMonthly = "*monthly" MetaYearly = "*yearly" diff --git a/utils/ips.go b/utils/ips.go index b7002d221..8f6a67d5e 100644 --- a/utils/ips.go +++ b/utils/ips.go @@ -387,6 +387,16 @@ type AllocatedIP struct { Address netip.Addr } +// AsNavigableMap implements engine.NavigableMapper. +func (ip *AllocatedIP) AsNavigableMap() map[string]*DataNode { + return map[string]*DataNode{ + ProfileID: NewLeafNode(ip.ProfileID), + PoolID: NewLeafNode(ip.PoolID), + Message: NewLeafNode(ip.Message), + Address: NewLeafNode(ip.Address.String()), + } +} + // IPAllocations represents IP allocations with usage tracking and TTL management. type IPAllocations struct { Tenant string