diff --git a/ipam/dummy.go b/ipam/dummy.go deleted file mode 100644 index 35d6898b..00000000 --- a/ipam/dummy.go +++ /dev/null @@ -1,32 +0,0 @@ -package ipam - -import ( - "errors" - - "github.com/weaveworks/weave/router" -) - -// Exists solely for the purpose of detecting a network in which some -// peers are configured with IPAM on and some with IPAM off. -type DummyAllocator struct { -} - -var ( - ErrMixedConfig = errors.New("Mixed IPAM/non-IPAM configuration not supported") -) - -func (alloc *DummyAllocator) OnGossipUnicast(sender router.PeerName, msg []byte) error { - return ErrMixedConfig -} - -func (alloc *DummyAllocator) OnGossipBroadcast(msg []byte) (router.GossipData, error) { - return nil, ErrMixedConfig -} - -func (alloc *DummyAllocator) OnGossip(msg []byte) (router.GossipData, error) { - return nil, ErrMixedConfig -} - -func (alloc *DummyAllocator) Gossip() router.GossipData { - return nil -} diff --git a/prog/weaver/main.go b/prog/weaver/main.go index 25fdad75..d0ac8596 100644 --- a/prog/weaver/main.go +++ b/prog/weaver/main.go @@ -153,8 +153,6 @@ func main() { } } else if peerCount > 0 { log.Fatal("-initpeercount flag specified without -iprange") - } else { - router.NewGossip("IPallocation", &ipam.DummyAllocator{}) } router.Start()