Initial commit of asset key tag security check
This commit is contained in:
@@ -70,6 +70,11 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
n.Root.Set(SetRoot)
|
||||
}
|
||||
|
||||
if SetAssetKey != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting asset key to: %s\n", n.Id.Get(), SetAssetKey)
|
||||
n.AssetKey.Set(SetAssetKey)
|
||||
}
|
||||
|
||||
if SetKernel != "" {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting kernel to: %s\n", n.Id.Get(), SetKernel)
|
||||
n.KernelVersion.Set(SetKernel)
|
||||
|
||||
@@ -71,6 +71,7 @@ var (
|
||||
SetKey string
|
||||
SetValue string
|
||||
SetKeyDel bool
|
||||
SetAssetKey string
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -94,6 +95,7 @@ func init() {
|
||||
baseCmd.PersistentFlags().StringVar(&SetIpxe, "ipxe", "", "Set the node's iPXE template name")
|
||||
baseCmd.PersistentFlags().StringVarP(&SetInit, "init", "i", "", "Define the init process to boot the container")
|
||||
baseCmd.PersistentFlags().StringVar(&SetRoot, "root", "", "Define the rootfs")
|
||||
baseCmd.PersistentFlags().StringVar(&SetAssetKey, "assetkey", "", "Set the node's Asset tag (key)")
|
||||
baseCmd.PersistentFlags().StringVarP(&SetInitOverlay, "wwinit", "O", "", "Set the node's initialization overlay")
|
||||
baseCmd.PersistentFlags().StringVarP(&SetRuntimeOverlay, "runtime", "R", "", "Set the node's runtime overlay")
|
||||
if err := baseCmd.RegisterFlagCompletionFunc("runtime", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
|
||||
Reference in New Issue
Block a user