store the ovelats as yaml list
This commit is contained in:
@@ -90,14 +90,14 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
n.Ipxe.Set(SetIpxe)
|
||||
}
|
||||
|
||||
if SetRuntimeOverlay != "" {
|
||||
if len(SetRuntimeOverlay) != 0 {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting runtime overlay to: %s\n", n.Id.Get(), SetRuntimeOverlay)
|
||||
n.RuntimeOverlay.Set(SetRuntimeOverlay)
|
||||
n.RuntimeOverlay.SetSlice(SetRuntimeOverlay)
|
||||
}
|
||||
|
||||
if SetSystemOverlay != "" {
|
||||
if len(SetSystemOverlay) != 0 {
|
||||
wwlog.Printf(wwlog.VERBOSE, "Node: %s, Setting system overlay to: %s\n", n.Id.Get(), SetSystemOverlay)
|
||||
n.SystemOverlay.Set(SetSystemOverlay)
|
||||
n.SystemOverlay.SetSlice(SetSystemOverlay)
|
||||
}
|
||||
|
||||
if SetIpmiIpaddr != "" {
|
||||
|
||||
@@ -49,8 +49,8 @@ var (
|
||||
SetClusterName string
|
||||
SetIpxe string
|
||||
SetInitOverlay string
|
||||
SetRuntimeOverlay string
|
||||
SetSystemOverlay string
|
||||
SetRuntimeOverlay []string
|
||||
SetSystemOverlay []string
|
||||
SetIpmiIpaddr string
|
||||
SetIpmiNetmask string
|
||||
SetIpmiPort string
|
||||
@@ -97,14 +97,14 @@ func init() {
|
||||
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")
|
||||
baseCmd.PersistentFlags().StringSliceVarP(&SetRuntimeOverlay, "runtime", "R", []string{}, "Set the node's runtime overlay")
|
||||
if err := baseCmd.RegisterFlagCompletionFunc("runtime", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
list, _ := overlay.FindOverlays()
|
||||
return list, cobra.ShellCompDirectiveNoFileComp
|
||||
}); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
baseCmd.PersistentFlags().StringVarP(&SetSystemOverlay, "system", "S", "", "Set the node's system overlay")
|
||||
baseCmd.PersistentFlags().StringSliceVarP(&SetSystemOverlay, "system", "S", []string{}, "Set the node's system overlay")
|
||||
if err := baseCmd.RegisterFlagCompletionFunc("system", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
list, _ := overlay.FindOverlays()
|
||||
return list, cobra.ShellCompDirectiveNoFileComp
|
||||
|
||||
Reference in New Issue
Block a user