Also the boot method is now configured globaly as this is the only way to make sure that unkonwn nodes get the right stuff Signed-off-by: Christian Goll <cgoll@suse.com>
27 lines
562 B
Go
27 lines
562 B
Go
package delete
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/hpcng/warewulf/internal/pkg/api/container"
|
|
"github.com/hpcng/warewulf/internal/pkg/api/routes/wwapiv1"
|
|
apiutil "github.com/hpcng/warewulf/internal/pkg/api/util"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
|
cdp := &wwapiv1.ContainerDeleteParameter{
|
|
ContainerNames: args,
|
|
}
|
|
|
|
if !SetYes {
|
|
yes := apiutil.ConfirmationPrompt(fmt.Sprintf("Are you sure you want to delete container %s", args))
|
|
if !yes {
|
|
return
|
|
}
|
|
|
|
}
|
|
return container.ContainerDelete(cdp)
|
|
}
|