Lots of changes including: wwctl overlay list and framework for other commands

This commit is contained in:
Gregory Kurtzer
2020-11-16 21:37:55 -08:00
parent 52eb51e38a
commit 85603ee947
19 changed files with 484 additions and 34 deletions

View File

@@ -1,6 +1,8 @@
package overlay
import (
"github.com/hpcng/warewulf/internal/app/wwctl/overlay/create"
"github.com/hpcng/warewulf/internal/app/wwctl/overlay/edit"
"github.com/hpcng/warewulf/internal/app/wwctl/overlay/list"
"github.com/hpcng/warewulf/internal/app/wwctl/overlay/show"
@@ -8,7 +10,7 @@ import (
)
var (
overlayCmd = &cobra.Command{
baseCmd = &cobra.Command{
Use: "overlay",
Short: "Warewulf Overlay Management",
Long: "Management interface for Warewulf overlays",
@@ -17,14 +19,17 @@ var (
)
func init() {
overlayCmd.PersistentFlags().BoolVarP(&test, "test", "t", false, "Testing.")
// baseCmd.PersistentFlags().BoolVarP(&test, "test", "t", false, "Testing.")
baseCmd.AddCommand(list.GetCommand())
baseCmd.AddCommand(show.GetCommand())
baseCmd.AddCommand(create.GetCommand())
baseCmd.AddCommand(edit.GetCommand())
overlayCmd.AddCommand(list.GetCommand())
overlayCmd.AddCommand(show.GetCommand())
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return overlayCmd
return baseCmd
}