Added controllers, services, and lots of various optimizations and fixes

This commit is contained in:
Gregory Kurtzer
2020-11-30 23:07:42 -08:00
parent 210d0044a5
commit 4d752a67db
35 changed files with 1147 additions and 365 deletions

View File

@@ -1,11 +1,13 @@
package wwctl
import (
"github.com/hpcng/warewulf/internal/app/wwctl/controller"
"github.com/hpcng/warewulf/internal/app/wwctl/group"
"github.com/hpcng/warewulf/internal/app/wwctl/kernel"
"github.com/hpcng/warewulf/internal/app/wwctl/node"
"github.com/hpcng/warewulf/internal/app/wwctl/overlay"
"github.com/hpcng/warewulf/internal/app/wwctl/profile"
"github.com/hpcng/warewulf/internal/app/wwctl/services"
"github.com/hpcng/warewulf/internal/app/wwctl/vnfs"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
@@ -14,26 +16,29 @@ import (
var (
rootCmd = &cobra.Command{
Use: "wwctl",
Short: "Warewulf Control",
Long: "Control interface to the Cluster Warewulf Provisioning System.",
PersistentPreRunE: rootPersistentPreRunE,
Use: "wwctl",
Short: "Warewulf Control",
Long: "Control interface to the Cluster Warewulf Provisioning System.",
PersistentPreRunE: rootPersistentPreRunE,
}
verboseArg bool
debugArg bool
debugArg bool
)
func init() {
rootCmd.PersistentFlags().BoolVarP(&verboseArg, "verbose", "v", false, "Run with increased verbosity.")
rootCmd.PersistentFlags().BoolVarP(&debugArg, "debug", "d", false, "Run with debugging messages enabled.")
rootCmd.AddCommand(overlay.GetCommand())
//rootCmd.AddCommand(build.GetCommand())
rootCmd.AddCommand(overlay.GetCommand())
rootCmd.AddCommand(controller.GetCommand())
rootCmd.AddCommand(vnfs.GetCommand())
rootCmd.AddCommand(node.GetCommand())
rootCmd.AddCommand(kernel.GetCommand())
rootCmd.AddCommand(group.GetCommand())
rootCmd.AddCommand(profile.GetCommand())
rootCmd.AddCommand(services.GetCommand())
}
@@ -51,4 +56,4 @@ func rootPersistentPreRunE(cmd *cobra.Command, args []string) error {
wwlog.SetLevel(wwlog.INFO)
}
return nil
}
}