Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
fleetctl: switch default driver to API
Browse files Browse the repository at this point in the history
  • Loading branch information
bcwaldon committed Nov 20, 2014
1 parent 9e28bce commit 7fb89f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fleetctl/fleetctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ func init() {

globalFlagset.BoolVar(&globalFlags.Debug, "debug", false, "Print out more debug information to stderr")
globalFlagset.BoolVar(&globalFlags.Version, "version", false, "Print the version and exit")
globalFlagset.StringVar(&globalFlags.ClientDriver, "driver", clientDriverEtcd, fmt.Sprintf("Adapter used to execute fleetctl commands. Options include %q and %q.", clientDriverAPI, clientDriverEtcd))
globalFlagset.StringVar(&globalFlags.Endpoint, "endpoint", "http://127.0.0.1:4001", fmt.Sprintf("Location of the fleet API if --driver=%s. Alternatively, if --driver=%s, location of the etcd API.", clientDriverAPI, clientDriverEtcd))
globalFlagset.StringVar(&globalFlags.ClientDriver, "driver", clientDriverAPI, fmt.Sprintf("Adapter used to execute fleetctl commands. Options include %q and %q.", clientDriverAPI, clientDriverEtcd))
globalFlagset.StringVar(&globalFlags.Endpoint, "endpoint", "unix:///var/run/fleet.sock", fmt.Sprintf("Location of the fleet API if --driver=%s. Alternatively, if --driver=%s, location of the etcd API.", clientDriverAPI, clientDriverEtcd))
globalFlagset.StringVar(&globalFlags.EtcdKeyPrefix, "etcd-key-prefix", registry.DefaultKeyPrefix, "Keyspace for fleet data in etcd (development use only!)")

globalFlagset.StringVar(&globalFlags.KeyFile, "keyfile", "", "Location of TLS key file used to secure communication with the fleet API or etcd")
Expand All @@ -133,7 +133,7 @@ func init() {
globalFlagset.Float64Var(&globalFlags.RequestTimeout, "request-timeout", 3.0, "Amount of time in seconds to allow a single request before considering it failed.")

// deprecated flags
globalFlagset.BoolVar(&globalFlags.ExperimentalAPI, "experimental-api", false, hidden)
globalFlagset.BoolVar(&globalFlags.ExperimentalAPI, "experimental-api", true, hidden)
globalFlagset.StringVar(&globalFlags.KeyFile, "etcd-keyfile", "", hidden)
globalFlagset.StringVar(&globalFlags.CertFile, "etcd-certfile", "", hidden)
globalFlagset.StringVar(&globalFlags.CAFile, "etcd-cafile", "", hidden)
Expand Down Expand Up @@ -295,10 +295,10 @@ func getFlagsFromEnv(prefix string, fs *flag.FlagSet) {

// getClient initializes a client of fleet based on CLI flags
func getClient() (client.API, error) {
// The user explicitly set --experimental-api=true, so it trumps the
// The user explicitly set --experimental-api=false, so it trumps the
// --driver flag. This behavior exists for backwards-compatibilty.
if globalFlags.ExperimentalAPI {
return getHTTPClient()
if !globalFlags.ExperimentalAPI {
return getRegistryClient()
}

switch globalFlags.ClientDriver {
Expand Down

0 comments on commit 7fb89f1

Please sign in to comment.