Refactor the CreateFlags command

* added the additional type flag, which can be bool,IP
* UNDEF is recognized for the bool flag
* 0.0.0.0 must be used as UNDEF for IP flag

Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
Christian Goll
2023-02-02 17:06:03 +01:00
parent 09d14039b0
commit 13bc378a6b
11 changed files with 241 additions and 116 deletions

View File

@@ -13,6 +13,10 @@ import (
)
func CobraRunE(cmd *cobra.Command, args []string) (err error) {
// run converters for different types
for _, c := range Converters {
c()
}
// remove the default network as the all network values are assigned
// to this network
if NetName != "default" {