VOL-1971 - make v2 the default API version
Change-Id: Ib0b29187d40cd77f78fc162151f8c49f7af9ca55
diff --git a/internal/pkg/commands/command.go b/internal/pkg/commands/command.go
index 43ead45..4693539 100644
--- a/internal/pkg/commands/command.go
+++ b/internal/pkg/commands/command.go
@@ -72,7 +72,7 @@
CharReplacer = strings.NewReplacer("\\t", "\t", "\\n", "\n")
GlobalConfig = GlobalConfigSpec{
- ApiVersion: "v1",
+ ApiVersion: "v2",
Server: "localhost",
Tls: TlsConfigSpec{
UseTls: false,
@@ -83,8 +83,9 @@
}
GlobalOptions struct {
- Config string `short:"c" long:"config" env:"VOLTCONFIG" value-name:"FILE" default:"" description:"Location of client config file"`
- Server string `short:"s" long:"server" default:"" value-name:"SERVER:PORT" description:"IP/Host and port of VOLTHA"`
+ Config string `short:"c" long:"config" env:"VOLTCONFIG" value-name:"FILE" default:"" description:"Location of client config file"`
+ Server string `short:"s" long:"server" default:"" value-name:"SERVER:PORT" description:"IP/Host and port of VOLTHA"`
+ // Do not set the default for the API version here, else it will override the value read in the config
ApiVersion string `short:"a" long:"apiversion" description:"API version" value-name:"VERSION" choice:"v1" choice:"v2"`
Debug bool `short:"d" long:"debug" description:"Enable debug mode"`
UseTLS bool `long:"tls" description:"Use TLS"`