Persist Floating IP UUIDs for direct Neutron operations
This commit is contained in:
1 parent
89ac4d5bcd
commit
94124747ce
24 files changed
+918
-116
No files matched your search
@@ -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 ©, 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.
|
||||
|
||||
Reference in new issue
Block a user