func (p *provider) DeleteNodes(n []nodes.Node) error {
	if len(n) == 0 {
		return nil
	}
	const command = "podman"
	args := make([]string, 0, len(n)+3) // allocate once
	args = append(args,
		"rm",
		"-f", // force the container to be delete now
		"-v", // delete volumes
	)
	for _, node := range n {
		args = append(args, node.String())
	}
	if err := exec.Command(command, args...).Run(); err != nil {
		return errors.Wrap(err, "failed to delete nodes")
	}
	var nodeVolumes []string
	for _, node := range n {
		volumes, err := getVolumes(node.String())
		if err != nil {
			return err
		}
		nodeVolumes = append(nodeVolumes, volumes...)
	}
	return deleteVolumes(nodeVolumes)
}
// DeleteNodes is part of the providers.Provider interface
DeleteNodes is part of the providers.Provider interface
// DeleteNodes is part of the providers . Provider interface
func (p *provider) DeleteNodes(n []nodes.Node) error {
	if len(n) == 0 {
		return nil
	}
	const command = "podman"
	args := make([]string, 0, len(n)+3) 
	args = append(args,
		"rm",
		"-f", 
		"-v", 
	)
	for _, node := range n {
		args = append(args, node.String())
	}
	if err := exec.Command(command, args...).Run(); err != nil {
		return errors.Wrap(err, "failed to delete nodes")
	}
	var nodeVolumes []string
	for _, node := range n {
		volumes, err := getVolumes(node.String())
		if err != nil {
			return err
		}
		nodeVolumes = append(nodeVolumes, volumes...)
	}
	return deleteVolumes(nodeVolumes)
}
func ( p * provider ) DeleteNodes ( n [ ] nodes . Node ) error { if len ( n ) == 0 { return nil } const command = " " args := make ( [ ] string , 0 , len ( n ) + 3 ) args = append ( args , " " , " " , " " , ) for _ , node := range n { args = append ( args , node . String ( ) ) } if err := exec . Command ( command , args ... ) . Run ( ) ; err != nil { return errors . Wrap ( err , " " ) } var nodeVolumes [ ] string for _ , node := range n { volumes , err := getVolumes ( node . String ( ) ) if err != nil { return err } nodeVolumes = append ( nodeVolumes , volumes ... ) } return deleteVolumes ( nodeVolumes ) }
DeleteNodes is part of the providers.Provider interface
DeleteNodes is part of the providers . Provider interface
// allocate once // force the container to be delete now // delete volumes