fix test to run without NodeInfo

Also removed --fullall from node list and profile list

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2023-12-20 15:52:44 +01:00
committed by Jonathon Anderson
parent ffef31969e
commit ac6cd69ca6
28 changed files with 456 additions and 993 deletions

View File

@@ -28,11 +28,11 @@ func ProfileList(ShowOpt *wwapiv1.GetProfileList) (profileList wwapiv1.ProfileLi
sort.Slice(profiles, func(i, j int) bool {
return profiles[i].Id() < profiles[j].Id()
})
if ShowOpt.ShowAll || ShowOpt.ShowFullAll {
if ShowOpt.ShowAll {
for _, p := range profiles {
profileList.Output = append(profileList.Output,
fmt.Sprintf("%s:=:%s:=:%s", "PROFILE", "FIELD", "VALUE"))
fields := p.GetFields(ShowOpt.ShowFullAll)
fields := p.GetFields(ShowOpt.ShowAll)
for _, f := range fields {
profileList.Output = append(profileList.Output,
fmt.Sprintf("%s:=:%s:=:%s", p.Id.Print(), f.Field, f.Value))