do not combine overlays any more
This commit is contained in:
@@ -43,8 +43,8 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "Container", node.ContainerName.Source(), node.ContainerName.Print())
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "KernelOverride", node.KernelOverride.Source(), node.KernelOverride.Print())
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "KernelArgs", node.KernelArgs.Source(), node.KernelArgs.Print())
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "SystemOverlay", node.SystemOverlay.Source(), node.SystemOverlay.PrintComb())
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "RuntimeOverlay", node.RuntimeOverlay.Source(), node.RuntimeOverlay.PrintComb())
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "SystemOverlay", node.SystemOverlay.Source(), node.SystemOverlay.Print())
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "RuntimeOverlay", node.RuntimeOverlay.Source(), node.RuntimeOverlay.Print())
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "Ipxe", node.Ipxe.Source(), node.Ipxe.Print())
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "Init", node.Init.Source(), node.Init.Print())
|
||||
fmt.Printf("%-20s %-18s %-12s %s\n", node.Id.Get(), "Root", node.Root.Source(), node.Root.Print())
|
||||
|
||||
@@ -3,8 +3,6 @@ package node
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/hpcng/warewulf/internal/pkg/util"
|
||||
)
|
||||
|
||||
/**********
|
||||
@@ -120,19 +118,22 @@ func (ent *Entry) GetReal() string {
|
||||
}
|
||||
|
||||
/*
|
||||
Returns a string slice, which is the combination of value, altvalue and def.
|
||||
The elemtent in the slice are uniq.
|
||||
Returns a string slice created from a comma seperated list of the value.
|
||||
*/
|
||||
func (ent *Entry) GetSlice() []string {
|
||||
var retval []string
|
||||
if ent.value != "" {
|
||||
retval = util.SliceAppendUniq(retval, strings.Split(ent.value, ","))
|
||||
//retval = util.SliceAppendUniq(retval, strings.Split(ent.value, ","))
|
||||
return strings.Split(ent.value, ",")
|
||||
}
|
||||
if ent.altvalue != "" {
|
||||
retval = util.SliceAppendUniq(retval, strings.Split(ent.altvalue, ","))
|
||||
//retval = util.SliceAppendUniq(retval, strings.Split(ent.altvalue, ","))
|
||||
return strings.Split(ent.altvalue, ",")
|
||||
}
|
||||
if ent.def != "" && len(retval) == 0 {
|
||||
retval = util.SliceAppendUniq(retval, strings.Split(ent.def, ","))
|
||||
//if ent.def != "" && len(retval) == 0 {
|
||||
if ent.def != "" {
|
||||
//retval = util.SliceAppendUniq(retval, strings.Split(ent.def, ","))
|
||||
return strings.Split(ent.def, ",")
|
||||
|
||||
}
|
||||
return retval
|
||||
@@ -157,13 +158,16 @@ func (ent *Entry) Print() string {
|
||||
return "--"
|
||||
}
|
||||
|
||||
/*
|
||||
Was used for combined stringSlice
|
||||
|
||||
func (ent *Entry) PrintComb() string {
|
||||
if ent.value != "" && ent.altvalue != "" {
|
||||
return "[" + ent.value + "," + ent.altvalue + "]"
|
||||
}
|
||||
return ent.Print()
|
||||
}
|
||||
|
||||
*/
|
||||
func (ent *Entry) PrintB() bool {
|
||||
return ent.GetB()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user