Repository: brooklyn-client Updated Branches: refs/heads/master 88bb5e7bd -> fa2d7b3db
adds flag for connecting to servers using self-sign ssl, fixing existing code that handles flags Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/6367a98f Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/6367a98f Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/6367a98f Branch: refs/heads/master Commit: 6367a98f5311543097dedb9464c4978129d5700b Parents: 8ecbfe7 Author: Robert Moss <robert.m...@cloudsoftcorp.com> Authored: Tue Feb 14 15:44:23 2017 +0000 Committer: Robert Moss <robert.m...@cloudsoftcorp.com> Committed: Tue Feb 14 15:44:23 2017 +0000 ---------------------------------------------------------------------- cli/commands/login.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/6367a98f/cli/commands/login.go ---------------------------------------------------------------------- diff --git a/cli/commands/login.go b/cli/commands/login.go index 349b0d8..b0413ce 100644 --- a/cli/commands/login.go +++ b/cli/commands/login.go @@ -20,6 +20,8 @@ package commands import ( "fmt" + "syscall" + "github.com/apache/brooklyn-client/cli/api/version" "github.com/apache/brooklyn-client/cli/command_metadata" "github.com/apache/brooklyn-client/cli/error_handler" @@ -28,7 +30,6 @@ import ( "github.com/apache/brooklyn-client/cli/scope" "github.com/urfave/cli" "golang.org/x/crypto/ssh/terminal" - "syscall" ) type Login struct { @@ -48,7 +49,7 @@ func (cmd *Login) Metadata() command_metadata.CommandMetadata { Name: "login", Description: "Login to brooklyn", Usage: "BROOKLYN_NAME login URL [USER [PASSWORD]]", - Flags: []cli.Flag{}, + Flags: []cli.Flag{cli.BoolFlag{Name: "skipSslChecks", Usage: "Skip SSL Checks"}}, } } @@ -61,7 +62,7 @@ func (cmd *Login) Run(scope scope.Scope, c *cli.Context) { cmd.network.BrooklynUrl = c.Args().Get(0) cmd.network.BrooklynUser = c.Args().Get(1) cmd.network.BrooklynPass = c.Args().Get(2) - cmd.network.SkipSslChecks = c.GlobalBool("skipSslChecks") + cmd.network.SkipSslChecks = c.Bool("skipSslChecks") if err := net.VerifyLoginURL(cmd.network); err != nil { error_handler.ErrorExit(err)