Merge pull request #47236 from akerouanton/remove-sb-leave-options-param
libnet: remove arg `options` from (*Endpoint).Leave()
This commit is contained in:
commit
f472dda2e9
1 changed files with 3 additions and 5 deletions
|
@ -673,7 +673,7 @@ func (ep *Endpoint) hasInterface(iName string) bool {
|
|||
}
|
||||
|
||||
// Leave detaches the network resources populated in the sandbox.
|
||||
func (ep *Endpoint) Leave(sb *Sandbox, options ...EndpointOption) error {
|
||||
func (ep *Endpoint) Leave(sb *Sandbox) error {
|
||||
if sb == nil || sb.ID() == "" || sb.Key() == "" {
|
||||
return types.InvalidParameterErrorf("invalid Sandbox passed to endpoint leave: %v", sb)
|
||||
}
|
||||
|
@ -681,10 +681,10 @@ func (ep *Endpoint) Leave(sb *Sandbox, options ...EndpointOption) error {
|
|||
sb.joinLeaveStart()
|
||||
defer sb.joinLeaveEnd()
|
||||
|
||||
return ep.sbLeave(sb, false, options...)
|
||||
return ep.sbLeave(sb, false)
|
||||
}
|
||||
|
||||
func (ep *Endpoint) sbLeave(sb *Sandbox, force bool, options ...EndpointOption) error {
|
||||
func (ep *Endpoint) sbLeave(sb *Sandbox, force bool) error {
|
||||
n, err := ep.getNetworkFromStore()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get network from store during leave: %v", err)
|
||||
|
@ -706,8 +706,6 @@ func (ep *Endpoint) sbLeave(sb *Sandbox, force bool, options ...EndpointOption)
|
|||
return types.ForbiddenErrorf("unexpected sandbox ID in leave request. Expected %s. Got %s", ep.sandboxID, sb.ID())
|
||||
}
|
||||
|
||||
ep.processOptions(options...)
|
||||
|
||||
d, err := n.driver(!force)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get driver during endpoint leave: %v", err)
|
||||
|
|
Loading…
Reference in a new issue