api changes for use without NodeInfo

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2023-12-15 15:40:51 +01:00
committed by Jonathon Anderson
parent 457c7c16b1
commit ffef31969e
19 changed files with 912 additions and 1106 deletions

View File

@@ -39,7 +39,7 @@ func FilteredProfiles(profileList *wwapiv1.NodeList) *wwapiv1.NodeYaml {
os.Exit(1)
}
profileMap := nodeDB.NodeProfiles
profileMap = node.FilterMapByName(profileMap, profileList.Output)
profileMap = node.FilterProfilesByName(profileMap, profileList.Output)
buffer, _ := yaml.Marshal(profileMap)
retVal := wwapiv1.NodeYaml{
NodeConfMapYaml: string(buffer),
@@ -59,7 +59,7 @@ func ProfileAddFromYaml(nodeList *wwapiv1.NodeAddParameter) (err error) {
return fmt.Errorf("got wrong hash, not modifying profile database")
}
profileMap := make(map[string]*node.NodeConf)
profileMap := make(map[string]*node.ProfileConf)
err = yaml.Unmarshal([]byte(nodeList.NodeConfYaml), profileMap)
if err != nil {
return errors.Wrap(err, "Could not unmarshall Yaml: %s\n")