Properly configure a network device to be default

This commit is contained in:
Gregory Kurtzer
2020-12-22 21:51:05 -08:00
parent 01dd0e4ad7
commit 8a419f648b
6 changed files with 44 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ var (
SetGateway string
SetHwaddr string
SetNetDevDel bool
SetNetDevDefault bool
SetClusterName string
SetIpxe string
SetRuntimeOverlay string
@@ -66,6 +67,8 @@ func init() {
baseCmd.PersistentFlags().StringVarP(&SetGateway, "gateway", "G", "", "Set the node's network device gateway")
baseCmd.PersistentFlags().StringVarP(&SetHwaddr, "hwaddr", "H", "", "Set the node's network device HW address")
baseCmd.PersistentFlags().BoolVar(&SetNetDevDel, "netdel", false, "Delete the node's network device")
baseCmd.PersistentFlags().BoolVar(&SetNetDevDefault, "netdefault", false, "Set this network to be default")
baseCmd.PersistentFlags().BoolVarP(&SetNodeAll, "all", "a", false, "Set all nodes")
baseCmd.PersistentFlags().BoolVarP(&SetYes, "yes", "y", false, "Set 'yes' to all questions asked")