func (p *provider) ListNodes(cluster string) ([]nodes.Node, error) {
	cmd := exec.Command("podman",
		"ps",
		"-a", // show stopped nodes
		// filter for nodes with the cluster label
		"--filter", fmt.Sprintf("label=%s=%s", clusterLabelKey, cluster),
		// format to include the cluster name
		"--format", `{{.Names}}`,
	)
	lines, err := exec.OutputLines(cmd)
	if err != nil {
		return nil, errors.Wrap(err, "failed to list clusters")
	}
	// convert names to node handles
	ret := make([]nodes.Node, 0, len(lines))
	for _, name := range lines {
		ret = append(ret, p.node(name))
	}
	return ret, nil
}
// ListNodes is part of the providers.Provider interface
ListNodes is part of the providers.Provider interface
// ListNodes is part of the providers . Provider interface
func (p *provider) ListNodes(cluster string) ([]nodes.Node, error) {
	cmd := exec.Command("podman",
		"ps",
		"-a", 
		"--filter", fmt.Sprintf("label=%s=%s", clusterLabelKey, cluster),
		"--format", `{{.Names}}`,
	)
	lines, err := exec.OutputLines(cmd)
	if err != nil {
		return nil, errors.Wrap(err, "failed to list clusters")
	}
	ret := make([]nodes.Node, 0, len(lines))
	for _, name := range lines {
		ret = append(ret, p.node(name))
	}
	return ret, nil
}
func ( p * provider ) ListNodes ( cluster string ) ( [ ] nodes . Node , error ) { cmd := exec . Command ( " " , " " , " " , " " , fmt . Sprintf ( " " , clusterLabelKey , cluster ) , " " , `{{.Names}}` , ) lines , err := exec . OutputLines ( cmd ) if err != nil { return nil , errors . Wrap ( err , " " ) } ret := make ( [ ] nodes . Node , 0 , len ( lines ) ) for _ , name := range lines { ret = append ( ret , p . node ( name ) ) } return ret , nil }
ListNodes is part of the providers.Provider interface
ListNodes is part of the providers . Provider interface
// show stopped nodes // filter for nodes with the cluster label // format to include the cluster name // convert names to node handles