Browse code

libnet/ipamapi: Remove unused errors

These errors aren't used in our repo and seem unused by the OSS
community (this was checked with Sourcegraph).

- ErrIpamInternalError has never been used
- ErrInvalidRequest is unused since moby/libnetwork@c85356efa
- ErrPoolNotFound has never been used
- ErrOverlapPool has never been used
- ErrNoAvailablePool has never been used

Signed-off-by: Albin Kerouanton <albinker@gmail.com>

Albin Kerouanton authored on 2023/08/09 02:44:14
Showing 1 changed files
... ...
@@ -29,14 +29,9 @@ type Registerer interface {
29 29
 
30 30
 // Well-known errors returned by IPAM
31 31
 var (
32
-	ErrIpamInternalError   = types.InternalErrorf("IPAM Internal Error")
33 32
 	ErrInvalidAddressSpace = types.BadRequestErrorf("Invalid Address Space")
34 33
 	ErrInvalidPool         = types.BadRequestErrorf("Invalid Address Pool")
35 34
 	ErrInvalidSubPool      = types.BadRequestErrorf("Invalid Address SubPool")
36
-	ErrInvalidRequest      = types.BadRequestErrorf("Invalid Request")
37
-	ErrPoolNotFound        = types.BadRequestErrorf("Address Pool not found")
38
-	ErrOverlapPool         = types.ForbiddenErrorf("Address pool overlaps with existing pool on this address space")
39
-	ErrNoAvailablePool     = types.NoServiceErrorf("No available pool")
40 35
 	ErrNoAvailableIPs      = types.NoServiceErrorf("No available addresses on this pool")
41 36
 	ErrNoIPReturned        = types.NoServiceErrorf("No address returned")
42 37
 	ErrIPAlreadyAllocated  = types.ForbiddenErrorf("Address already in use")