func ExecDel(plugin string, netconf []byte) error { if os.Getenv("CNI_COMMAND") != "DEL" { return fmt.Errorf("CNI_COMMAND is not DEL") } return invoke.ExecPluginWithoutResult(invoke.Find(plugin), netconf, invoke.ArgsFromEnv()) }
func (c *CNIConfig) DelNetwork(net *NetworkConfig, rt *RuntimeConf) error { pluginPath := invoke.FindInPath(net.Network.Type, c.Path) return invoke.ExecPluginWithoutResult(pluginPath, net.Bytes, c.args("DEL", rt)) }