libnet/d/bridge: Change interface implemented by error types
- InvalidIPTablesCfgError: implement InternalError instead of BadRequestError. This error is returned when an invalid iptables action is passed as argument (ie. none of -A, -I, or -D). - ErrInvalidDriverConfig: don't implement BadRequestError. This is returned when libnetwork controller initialization pass bad driver config -- there's no call from an HTTP route. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
parent
03db2f8c3d
commit
6d37ab0a83
1 changed files with 2 additions and 5 deletions
|
@ -24,9 +24,6 @@ func (eidc *ErrInvalidDriverConfig) Error() string {
|
|||
return "Invalid configuration passed to Bridge Driver"
|
||||
}
|
||||
|
||||
// BadRequest denotes the type of this error
|
||||
func (eidc *ErrInvalidDriverConfig) BadRequest() {}
|
||||
|
||||
// ErrInvalidNetworkConfig error is returned when a network is created on a driver without valid config.
|
||||
type ErrInvalidNetworkConfig struct{}
|
||||
|
||||
|
@ -229,8 +226,8 @@ func (action InvalidIPTablesCfgError) Error() string {
|
|||
return fmt.Sprintf("Invalid IPTables action '%s'", string(action))
|
||||
}
|
||||
|
||||
// BadRequest denotes the type of this error
|
||||
func (action InvalidIPTablesCfgError) BadRequest() {}
|
||||
// Internal denotes the type of this error
|
||||
func (action InvalidIPTablesCfgError) Internal() {}
|
||||
|
||||
// IPv4AddrAddError is returned when IPv4 address could not be added to the bridge.
|
||||
type IPv4AddrAddError struct {
|
||||
|
|
Loading…
Add table
Reference in a new issue