This is a work in progress API shift as the data structure has changed and I'm cleaning the interface.

This commit is contained in:
Gregory Kurtzer
2020-12-03 07:34:26 -08:00
parent 931a3cce05
commit eaf6bb1196
23 changed files with 665 additions and 825 deletions

View File

@@ -12,11 +12,22 @@ var (
}
SetGroup string
SetController string
SetNetDev string
SetIpaddr string
SetNetmask string
SetGateway string
SetHwaddr string
)
func init() {
baseCmd.PersistentFlags().StringVarP(&SetGroup, "group", "g", "default", "Group to add nodes to")
baseCmd.PersistentFlags().StringVarP(&SetController, "controller", "c", "localhost", "Controller to add nodes to")
baseCmd.PersistentFlags().StringVarP(&SetNetDev, "netdev", "n", "eth0", "Define the network device to configure")
baseCmd.PersistentFlags().StringVarP(&SetIpaddr, "ipaddr", "I", "", "Set the node's network device IP address")
baseCmd.PersistentFlags().StringVarP(&SetNetmask, "netmask", "M", "", "Set the node's network device netmask")
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")
}
// GetRootCommand returns the root cobra.Command for the application.