libnet: Fix error capitalization
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
parent
bd0111c1f4
commit
c22ec82477
4 changed files with 11 additions and 11 deletions
|
@ -1479,7 +1479,7 @@ func parseConnectivityOptions(cOptions map[string]interface{}) (*connectivityCon
|
|||
if pb, ok := opt.([]types.PortBinding); ok {
|
||||
cc.PortBindings = pb
|
||||
} else {
|
||||
return nil, types.InvalidParameterErrorf("Invalid port mapping data in connectivity configuration: %v", opt)
|
||||
return nil, types.InvalidParameterErrorf("invalid port mapping data in connectivity configuration: %v", opt)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1487,7 +1487,7 @@ func parseConnectivityOptions(cOptions map[string]interface{}) (*connectivityCon
|
|||
if ports, ok := opt.([]types.TransportPort); ok {
|
||||
cc.ExposedPorts = ports
|
||||
} else {
|
||||
return nil, types.InvalidParameterErrorf("Invalid exposed ports data in connectivity configuration: %v", opt)
|
||||
return nil, types.InvalidParameterErrorf("invalid exposed ports data in connectivity configuration: %v", opt)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ func (d *driver) parseNetworkOptions(id string, genericOptions map[string]string
|
|||
config.MacPools = make([]hcsshim.MacPool, 0)
|
||||
s := strings.Split(value, ",")
|
||||
if len(s)%2 != 0 {
|
||||
return nil, types.InvalidParameterErrorf("Invalid mac pool. You must specify both a start range and an end range")
|
||||
return nil, types.InvalidParameterErrorf("invalid mac pool. You must specify both a start range and an end range")
|
||||
}
|
||||
for i := 0; i < len(s)-1; i += 2 {
|
||||
config.MacPools = append(config.MacPools, hcsshim.MacPool{
|
||||
|
|
|
@ -1112,7 +1112,7 @@ func (ep *Endpoint) assignAddressVersion(ipVer int, ipam ipamapi.Ipam) error {
|
|||
}
|
||||
}
|
||||
if progAdd != nil {
|
||||
return types.InvalidParameterErrorf("Invalid address %s: It does not belong to any of this network's subnets", prefAdd)
|
||||
return types.InvalidParameterErrorf("invalid address %s: It does not belong to any of this network's subnets", prefAdd)
|
||||
}
|
||||
return fmt.Errorf("no available IPv%d addresses on this network's address pools: %s (%s)", ipVer, n.Name(), n.ID())
|
||||
}
|
||||
|
|
|
@ -29,15 +29,15 @@ type Registerer interface {
|
|||
|
||||
// Well-known errors returned by IPAM
|
||||
var (
|
||||
ErrInvalidAddressSpace = types.InvalidParameterErrorf("Invalid Address Space")
|
||||
ErrInvalidPool = types.InvalidParameterErrorf("Invalid Address Pool")
|
||||
ErrInvalidSubPool = types.InvalidParameterErrorf("Invalid Address SubPool")
|
||||
ErrNoAvailableIPs = types.UnavailableErrorf("No available addresses on this pool")
|
||||
ErrNoIPReturned = types.UnavailableErrorf("No address returned")
|
||||
ErrInvalidAddressSpace = types.InvalidParameterErrorf("invalid address space")
|
||||
ErrInvalidPool = types.InvalidParameterErrorf("invalid address pool")
|
||||
ErrInvalidSubPool = types.InvalidParameterErrorf("invalid address subpool")
|
||||
ErrNoAvailableIPs = types.UnavailableErrorf("no available addresses on this pool")
|
||||
ErrNoIPReturned = types.UnavailableErrorf("no address returned")
|
||||
ErrIPAlreadyAllocated = types.ForbiddenErrorf("Address already in use")
|
||||
ErrIPOutOfRange = types.InvalidParameterErrorf("Requested address is out of range")
|
||||
ErrIPOutOfRange = types.InvalidParameterErrorf("requested address is out of range")
|
||||
ErrPoolOverlap = types.ForbiddenErrorf("Pool overlaps with other one on this address space")
|
||||
ErrBadPool = types.InvalidParameterErrorf("Address space does not contain specified address pool")
|
||||
ErrBadPool = types.InvalidParameterErrorf("address space does not contain specified address pool")
|
||||
)
|
||||
|
||||
// Ipam represents the interface the IPAM service plugins must implement
|
||||
|
|
Loading…
Reference in a new issue