adding netname option back

This commit is contained in:
Christian Goll
2022-08-31 15:42:57 +02:00
parent 063c781710
commit 255ff61dc8
11 changed files with 68 additions and 52 deletions

View File

@@ -14,16 +14,15 @@ import (
)
func CobraRunE(cmd *cobra.Command, args []string) (err error) {
// OptionStrMap, netWithoutName := apinode.AddNetname(OptionStrMap)
// if netWithoutName {
// return errors.New("a netname must be given for any network related configuration")
// }
// realMap := make(map[string]string)
// remove the default network as the all network values are assigned
// to this network
if NetName != "" {
netDev := *ProfileConf.NetDevs["default"]
ProfileConf.NetDevs[NetName] = &netDev
delete(ProfileConf.NetDevs, "default")
// for key, val := range OptionStrMap {
// realMap[key] = *val
// }
buffer, err := yaml.Marshal(profileConf)
}
buffer, err := yaml.Marshal(ProfileConf)
if err != nil {
wwlog.Error("Cant marshall nodeInfo", err)
os.Exit(1)