Merge pull request #46345 from thaJeztah/libnetwork_remove_Endpoint_Interface

libnetwork: remove Endpoint.Interface()
This commit is contained in:
Sebastiaan van Stijn 2023-08-29 11:33:10 +02:00 committed by GitHub
commit 94e924906c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 18 deletions

View file

@ -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

View file

@ -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)