diff --git a/internal/app/wwctl/group/delete/main.go b/internal/app/wwctl/group/delete/main.go new file mode 100644 index 00000000..46ac54c3 --- /dev/null +++ b/internal/app/wwctl/group/delete/main.go @@ -0,0 +1,8 @@ +package delete + +import "github.com/spf13/cobra" + +func CobraRunE(cmd *cobra.Command, args []string) error { + + return nil +} diff --git a/internal/app/wwctl/group/delete/root.go b/internal/app/wwctl/group/delete/root.go new file mode 100644 index 00000000..ec72d924 --- /dev/null +++ b/internal/app/wwctl/group/delete/root.go @@ -0,0 +1,25 @@ +package delete + +import "github.com/spf13/cobra" + +var ( + baseCmd = &cobra.Command{ + Use: "del", + Short: "Add a new node group", + Long: "Add a new node group ", + RunE: CobraRunE, + } + SetVnfs string + SetKernel string + // SetGroupLevel bool +) + +func init() { + baseCmd.PersistentFlags().StringVarP(&SetVnfs, "vnfs", "V", "", "Set node Virtual Node File System (VNFS)") + baseCmd.PersistentFlags().StringVarP(&SetKernel, "kernel", "K", "", "Set Kernel version for nodes") +} + +// GetRootCommand returns the root cobra.Command for the application. +func GetCommand() *cobra.Command { + return baseCmd +} diff --git a/internal/app/wwctl/group/root.go b/internal/app/wwctl/group/root.go index 85fad06d..98cf1ebb 100644 --- a/internal/app/wwctl/group/root.go +++ b/internal/app/wwctl/group/root.go @@ -2,6 +2,7 @@ package group import ( "github.com/hpcng/warewulf/internal/app/wwctl/group/add" + "github.com/hpcng/warewulf/internal/app/wwctl/group/delete" "github.com/hpcng/warewulf/internal/app/wwctl/group/list" "github.com/hpcng/warewulf/internal/app/wwctl/group/set" "github.com/spf13/cobra" @@ -19,6 +20,7 @@ func init() { baseCmd.AddCommand(list.GetCommand()) baseCmd.AddCommand(set.GetCommand()) baseCmd.AddCommand(add.GetCommand()) + baseCmd.AddCommand(delete.GetCommand()) } // GetRootCommand returns the root cobra.Command for the application. diff --git a/internal/app/wwctl/node/delete/main.go b/internal/app/wwctl/node/delete/main.go new file mode 100644 index 00000000..46ac54c3 --- /dev/null +++ b/internal/app/wwctl/node/delete/main.go @@ -0,0 +1,8 @@ +package delete + +import "github.com/spf13/cobra" + +func CobraRunE(cmd *cobra.Command, args []string) error { + + return nil +} diff --git a/internal/app/wwctl/node/delete/root.go b/internal/app/wwctl/node/delete/root.go new file mode 100644 index 00000000..d91ba3b4 --- /dev/null +++ b/internal/app/wwctl/node/delete/root.go @@ -0,0 +1,25 @@ +package delete + +import "github.com/spf13/cobra" + +var ( + baseCmd = &cobra.Command{ + Use: "del", + Short: "Set node configurations", + Long: "Set node configurations ", + RunE: CobraRunE, + } + SetVnfs string + SetKernel string + // SetGroupLevel bool +) + +func init() { + baseCmd.PersistentFlags().StringVarP(&SetVnfs, "vnfs", "V", "", "Set node Virtual Node File System (VNFS)") + baseCmd.PersistentFlags().StringVarP(&SetKernel, "kernel", "K", "", "Set Kernel version for nodes") +} + +// GetRootCommand returns the root cobra.Command for the application. +func GetCommand() *cobra.Command { + return baseCmd +} diff --git a/internal/app/wwctl/node/root.go b/internal/app/wwctl/node/root.go index e4e29eba..8d7f4ab4 100644 --- a/internal/app/wwctl/node/root.go +++ b/internal/app/wwctl/node/root.go @@ -2,6 +2,7 @@ package node import ( "github.com/hpcng/warewulf/internal/app/wwctl/node/add" + "github.com/hpcng/warewulf/internal/app/wwctl/node/delete" "github.com/hpcng/warewulf/internal/app/wwctl/node/list" "github.com/hpcng/warewulf/internal/app/wwctl/node/poweron" "github.com/hpcng/warewulf/internal/app/wwctl/node/poweroff" @@ -25,7 +26,7 @@ func init() { baseCmd.AddCommand(list.GetCommand()) baseCmd.AddCommand(set.GetCommand()) baseCmd.AddCommand(add.GetCommand()) - + baseCmd.AddCommand(delete.GetCommand()) } // GetRootCommand returns the root cobra.Command for the application.