- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for NewFromSnapshot (0.2 sec)
-
pkg/registry/core/service/ipallocator/controller/repair_test.go
if err := r.runOnce(); err != nil { t.Fatal(err) } after, err := ipallocator.NewFromSnapshot(ipregistry.updated) if err != nil { t.Fatal(err) } if !after.Has(netutils.ParseIPSloppy("192.168.1.10")) { t.Errorf("expected ipallocator to still have leaked IP") } secondaryAfter, err := ipallocator.NewFromSnapshot(secondaryIPRegistry.updated) if err != nil { t.Fatal(err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Sep 30 15:46:06 UTC 2023 - 21.1K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/controller/repair_test.go
t.Fatal(err) } after, err := portallocator.NewFromSnapshot(registry.updated) if err != nil { t.Fatal(err) } if !after.Has(111) { t.Errorf("expected portallocator to still have leaked port") } } // Run one more time to actually remove the leak. if err := r.runOnce(); err != nil { t.Fatal(err) } after, err := portallocator.NewFromSnapshot(registry.updated) if err != nil { t.Fatal(err)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Sep 30 15:46:06 UTC 2023 - 10.6K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/bitmap.go
return allocator.NewAllocationMapWithOffset(max, rangeSpec, offset), nil }) } // NewFromSnapshot allocates a Range and initializes it from a snapshot. func NewFromSnapshot(snap *api.RangeAllocation) (*Range, error) { _, ipnet, err := netutils.ParseCIDRSloppy(snap.Range) if err != nil { return nil, err } r, err := NewInMemory(ipnet)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 25 20:32:40 UTC 2023 - 10.8K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/controller/repair.go
} // If not yet initialized. if snapshot.Range == "" { snapshot.Range = c.portRange.String() } // Create an allocator because it is easy to use. stored, err := portallocator.NewFromSnapshot(snapshot) if err != nil { return fmt.Errorf("unable to rebuild allocator from snapshot: %v", err) } // We explicitly send no resource version, since the resource version
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Sep 30 15:46:06 UTC 2023 - 10.4K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/controller/repair.go
snapshot.Range = c.networkByFamily[family].String() } } // Create an allocator because it is easy to use. for family, snapshot := range snapshotByFamily { stored, err := ipallocator.NewFromSnapshot(snapshot) if err != nil { return fmt.Errorf("unable to rebuild allocator from snapshots for family:%v with error:%v", family, err) } storedByFamily[family] = stored }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Sep 30 15:46:06 UTC 2023 - 13.8K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/allocator_test.go
if err != nil { t.Fatal(err) } allocated = append(allocated, p) } snapshot := api.RangeAllocation{} if err = r.Snapshot(&snapshot); err != nil { t.Fatal(err) } r, err = NewFromSnapshot(&snapshot) if err != nil { t.Fatal(err) } if x := r.Free(); x != 51 { t.Fatalf("expected 51 free ports, got %d", x) } if x := r.Used(); x != 50 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 08 07:15:02 UTC 2024 - 14K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/bitmap_test.go
t.Fatal(err) } allocated = append(allocated, ip) } snapshot := api.RangeAllocation{} if err = r.Snapshot(&snapshot); err != nil { t.Fatal(err) } r, err = NewFromSnapshot(&snapshot) if err != nil { t.Fatal(err) } if x := r.Free(); x != 126 { t.Fatalf("expected 126 free IPs, got %d", x) } if x := r.Used(); x != 128 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 25 20:32:40 UTC 2023 - 21.1K bytes - Viewed (0)