Merge pull request #71 in YUNIONIO/onecloud from ~LIZEXI/onecloud:hotfix/lzx-climc-insecure-rename to release/2.0.0

* commit '8e8a636d239f4ae471dfea70cf4a5cf5bfb3f653':
  climc: secure options rename to insecure
This commit is contained in:
李泽玺
2018-08-17 13:27:34 +08:00
+2 -2
View File
@@ -21,7 +21,7 @@ type BaseOptions struct {
Debug bool `help:"Show debug information"`
Version bool `help:"Show version"`
Timeout int `default:"600" help:"Number of seconds to wait for a response"`
Secure bool `default:"False" help:"do server cert verification if URL is https"`
Insecure bool `default:"False" help:"Allow skip server cert verification if URL is https" short-token:"k"`
OsUsername string `default:"$OS_USERNAME" help:"Username, defaults to env[OS_USERNAME]"`
OsPassword string `default:"$OS_PASSWORD" help:"Password, defaults to env[OS_PASSWORD]"`
// OsProjectId string `default:"$OS_PROJECT_ID" help:"Proejct ID, defaults to env[OS_PROJECT_ID]"`
@@ -116,7 +116,7 @@ func newClientSession(options *BaseOptions) (*mcclient.ClientSession, error) {
client := mcclient.NewClient(options.OsAuthURL,
options.Timeout,
options.Debug,
options.Secure)
options.Insecure)
token, err := client.Authenticate(options.OsUsername,
options.OsPassword,
options.OsDomainName,