removed optionStrMap in favor of NodeConf
openStrMap is a map[string]string which is sent arround. This is now done by using a unmarshalled NodeConf instead.
This commit is contained in:
@@ -36,18 +36,13 @@ var (
|
||||
SetNodeAll bool
|
||||
SetYes bool
|
||||
SetForce bool
|
||||
OptionStrMap map[string]*string
|
||||
profileConf node.NodeConf
|
||||
)
|
||||
|
||||
func init() {
|
||||
// init empty helper structs, so that we know what's inside
|
||||
myBase := node.CobraCommand{Command: baseCmd}
|
||||
var emptyNodeConf node.NodeConf
|
||||
emptyNodeConf.Kernel = new(node.KernelConf)
|
||||
emptyNodeConf.Ipmi = new(node.IpmiConf)
|
||||
OptionStrMap = myBase.CreateFlags(emptyNodeConf,
|
||||
profileConf = node.NewConf()
|
||||
profileConf.CreateFlags(baseCmd,
|
||||
[]string{"ipaddr", "ipaddr6", "ipmiaddr", "profile"})
|
||||
|
||||
baseCmd.PersistentFlags().StringVarP(&SetNetDevDel, "netdel", "D", "", "Delete the node's network device")
|
||||
baseCmd.PersistentFlags().BoolVarP(&SetNodeAll, "all", "a", false, "Set all nodes")
|
||||
baseCmd.PersistentFlags().BoolVarP(&SetYes, "yes", "y", false, "Set 'yes' to all questions asked")
|
||||
|
||||
Reference in New Issue
Block a user