MCPcopy
hub / github.com/moby/moby / loadIPAMDriver

Method loadIPAMDriver

daemon/libnetwork/controller.go:1082–1099  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

1080}
1081
1082func (c *Controller) loadIPAMDriver(name string) error {
1083 var err error
1084
1085 if pg := c.GetPluginGetter(); pg != nil {
1086 _, err = pg.Get(name, ipamapi.PluginEndpointType, plugingetter.Lookup)
1087 } else {
1088 _, err = plugins.Get(name, ipamapi.PluginEndpointType)
1089 }
1090
1091 if err != nil {
1092 if errors.Is(err, plugins.ErrNotFound) {
1093 return types.NotFoundErrorf("%v", err)
1094 }
1095 return err
1096 }
1097
1098 return nil
1099}
1100
1101func (c *Controller) getIPAMDriver(name string) (ipamapi.Ipam, *ipamapi.Capability, error) {
1102 id, caps := c.ipamRegistry.IPAM(name)

Callers 1

getIPAMDriverMethod · 0.95

Calls 5

GetPluginGetterMethod · 0.95
GetFunction · 0.92
NotFoundErrorfFunction · 0.92
GetMethod · 0.65
IsMethod · 0.45

Tested by

no test coverage detected