Merge pull request #46345 from thaJeztah/libnetwork_remove_Endpoint_Interface
libnetwork: remove Endpoint.Interface()
This commit is contained in:
commit
94e924906c
2 changed files with 2 additions and 18 deletions
|
@ -203,23 +203,7 @@ func (ep *Endpoint) Info() EndpointInfo {
|
|||
func (ep *Endpoint) Iface() *EndpointInterface {
|
||||
ep.mu.Lock()
|
||||
defer ep.mu.Unlock()
|
||||
|
||||
if ep.iface != nil {
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ep *Endpoint) Interface() driverapi.InterfaceInfo {
|
||||
ep.mu.Lock()
|
||||
defer ep.mu.Unlock()
|
||||
|
||||
if ep.iface != nil {
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
return nil
|
||||
return ep.iface
|
||||
}
|
||||
|
||||
// SetMacAddress allows the driver to set the mac address to the endpoint interface
|
||||
|
|
|
@ -1085,7 +1085,7 @@ func (n *Network) addEndpoint(ep *Endpoint) error {
|
|||
return fmt.Errorf("failed to add endpoint: %v", err)
|
||||
}
|
||||
|
||||
err = d.CreateEndpoint(n.id, ep.id, ep.Interface(), ep.generic)
|
||||
err = d.CreateEndpoint(n.id, ep.id, ep.Iface(), ep.generic)
|
||||
if err != nil {
|
||||
return types.InternalErrorf("failed to create endpoint %s on network %s: %v",
|
||||
ep.Name(), n.Name(), err)
|
||||
|
|
Loading…
Add table
Reference in a new issue