github.com/geofffranks/garden-linux@v0.0.0-20160715111146-26c893169cfa/network/subnets/errors.go (about) 1 package subnets 2 3 import "errors" 4 5 var ( 6 // ErrInsufficientSubnets is returned by AcquireDynamically if no more subnets can be allocated. 7 ErrInsufficientSubnets = errors.New("insufficient subnets remaining in the pool") 8 9 // ErrInsufficientIPs is returned by AcquireDynamically if no more IPs can be allocated. 10 ErrInsufficientIPs = errors.New("insufficient IPs remaining in the pool") 11 12 // ErrReleasedUnallocatedNetwork is returned by Release if the subnet is not allocated. 13 ErrReleasedUnallocatedSubnet = errors.New("subnet is not allocated") 14 15 // ErrOverlapsExistingSubnet is returned if a recovered subnet overlaps an existing, allocated subnet 16 ErrOverlapsExistingSubnet = errors.New("subnet overlaps an existing subnet") 17 18 // ErrInvalidRange is returned by AcquireStatically and by Recover if the subnet range is invalid. 19 ErrInvalidRange = errors.New("subnet has invalid range") 20 21 // ErrInvalidIP is returned if a static IP is requested inside a subnet 22 // which does not contain that IP 23 ErrInvalidIP = errors.New("the requested IP is not within the subnet") 24 25 // ErrIPAlreadyAcquired is returned if a static IP is requested which has already been allocated 26 ErrIPAlreadyAcquired = errors.New("the requested IP is already allocated") 27 28 // ErrIpCannotBeNil is returned by Release(..) and Recover(..) if a nil 29 // IP address is passed. 30 ErrIpCannotBeNil = errors.New("the IP field cannot be empty") 31 32 ErrIPEqualsGateway = errors.New("a container IP must not equal the gateway IP") 33 ErrIPEqualsBroadcast = errors.New("a container IP must not equal the broadcast IP") 34 )