- Updated `wwctl upgrade` to handle updates - Maintained `.Container` and `.ContainerName` in tstruct - Added `ContainerName()` methods to node and profile objects - Added `--container`, `-C` aliases to wwctl commands (`<node|profile> <add|set>`) - Added `wwctl container` alias - Added support for `container_exit.sh` if `image_exit.sh` is not found Signed-off-by: Jonathon Anderson <janderson@ciq.com>
29 lines
694 B
Go
29 lines
694 B
Go
package child
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
baseCmd = &cobra.Command{
|
|
DisableFlagsInUseLine: true,
|
|
Use: "__child",
|
|
Hidden: true,
|
|
RunE: CobraRunE,
|
|
Args: cobra.MinimumNArgs(1),
|
|
FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
|
|
}
|
|
binds []string
|
|
nodename string
|
|
)
|
|
|
|
func init() {
|
|
baseCmd.Flags().StringVarP(&nodename, "node", "n", "", "create ro overlay for given node")
|
|
baseCmd.Flags().StringArrayVarP(&binds, "bind", "b", []string{}, "bind points")
|
|
}
|
|
|
|
// GetRootCommand returns the root cobra.Command for the application.
|
|
func GetCommand() *cobra.Command {
|
|
return baseCmd
|
|
}
|