libnet/ipam: remove dead DumpDatabase()
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
parent
7301b98502
commit
8cb7558aaf
2 changed files with 0 additions and 32 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"fmt"
|
||||
"net"
|
||||
"net/netip"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/containerd/log"
|
||||
|
@ -236,18 +235,3 @@ func (aSpace *addrSpace) releaseAddress(nw, sub netip.Prefix, address netip.Addr
|
|||
|
||||
return p.addrs.Unset(netiputil.HostID(address, uint(nw.Bits())))
|
||||
}
|
||||
|
||||
func (aSpace *addrSpace) DumpDatabase() string {
|
||||
aSpace.mu.Lock()
|
||||
defer aSpace.mu.Unlock()
|
||||
|
||||
var b strings.Builder
|
||||
for k, config := range aSpace.subnets {
|
||||
fmt.Fprintf(&b, "%v: %v\n", k, config)
|
||||
fmt.Fprintf(&b, " Bitmap: %v\n", config.addrs)
|
||||
for k := range config.children {
|
||||
fmt.Fprintf(&b, " - Subpool: %v\n", k)
|
||||
}
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"fmt"
|
||||
"net"
|
||||
"net/netip"
|
||||
"strings"
|
||||
|
||||
"github.com/containerd/log"
|
||||
"github.com/docker/docker/libnetwork/bitmap"
|
||||
|
@ -248,21 +247,6 @@ func getAddress(base netip.Prefix, bitmask *bitmap.Bitmap, prefAddress netip.Add
|
|||
}
|
||||
}
|
||||
|
||||
// DumpDatabase dumps the internal info
|
||||
func (a *Allocator) DumpDatabase() string {
|
||||
aspaces := map[string]*addrSpace{
|
||||
localAddressSpace: a.local,
|
||||
globalAddressSpace: a.global,
|
||||
}
|
||||
|
||||
var b strings.Builder
|
||||
for _, as := range []string{localAddressSpace, globalAddressSpace} {
|
||||
fmt.Fprintf(&b, "\n### %s\n", as)
|
||||
b.WriteString(aspaces[as].DumpDatabase())
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
// IsBuiltIn returns true for builtin drivers
|
||||
func (a *Allocator) IsBuiltIn() bool {
|
||||
return true
|
||||
|
|
Loading…
Add table
Reference in a new issue