Persist Floating IP UUIDs for direct Neutron operations

This commit is contained in:
ayurishchev committed 2026-11-22 21:26:19 +03:00
1 parent 89ac4d5bcd
commit 94124747ce
24 files changed
+918 -116

No files matched your search

+11
View File
@@ -81,6 +81,17 @@ func (m *MockClient) GetFloatingIPByAddress(ctx context.Context, address string)
return &f, nil
}
func (m *MockClient) GetFloatingIP(ctx context.Context, id string) (*FloatingIP, error) {
m.mu.Lock()
defer m.mu.Unlock()
f, ok := m.fips[id]
if !ok {
return nil, ErrNotFound(id)
}
copy := *f
return &copy, nil
}
// SeedMany registers n free floating IPs with IDs "<prefix>-00000"… and
// ascending addresses starting at 198.18.0.1 (TEST-NET benchmarking range),
// returning the addresses in seed order.