MCPcopy Create free account
hub / github.com/Mirantis/cri-dockerd / SetUpPod

Method SetUpPod

network/plugins.go:484–506  ·  view source on GitHub ↗
(
	podNamespace, podName string,
	id config.ContainerID,
	annotations, options map[string]string,
)

Source from the content-addressed store, hash-verified

482}
483
484func (pm *PluginManager) SetUpPod(
485 podNamespace, podName string,
486 id config.ContainerID,
487 annotations, options map[string]string,
488) error {
489 const operation = "set_up_pod"
490 defer recordOperation(operation, time.Now())
491 fullPodName := buildPodFullName(podName, podNamespace)
492 pm.podLock(fullPodName).Lock()
493 defer pm.podUnlock(fullPodName)
494
495 if err := pm.plugin.SetUpPod(podNamespace, podName, id, annotations, options); err != nil {
496 recordError(operation)
497 return fmt.Errorf(
498 "networkPlugin %s failed to set up pod %q network: %v",
499 pm.plugin.Name(),
500 fullPodName,
501 err,
502 )
503 }
504
505 return nil
506}
507
508func (pm *PluginManager) TearDownPod(
509 podNamespace, podName string,

Callers 2

TestPluginManagerFunction · 0.95

Calls 7

podLockMethod · 0.95
podUnlockMethod · 0.95
buildPodFullNameFunction · 0.85
recordOperationFunction · 0.70
recordErrorFunction · 0.70
SetUpPodMethod · 0.65
NameMethod · 0.65

Tested by 2

TestPluginManagerFunction · 0.76