You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by tb...@apache.org on 2017/11/10 09:29:48 UTC
[1/2] brooklyn-client git commit: Default login port to 80/443 if not
supplied
Repository: brooklyn-client
Updated Branches:
refs/heads/master 18967dfcf -> cedb35079
Default login port to 80/443 if not supplied
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/925c8ca1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/925c8ca1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/925c8ca1
Branch: refs/heads/master
Commit: 925c8ca1921bb56fa7f236773727984fca1a264b
Parents: 18967df
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Authored: Thu Nov 9 22:15:01 2017 +0000
Committer: Geoff Macartney <ge...@cloudsoftcorp.com>
Committed: Thu Nov 9 22:19:43 2017 +0000
----------------------------------------------------------------------
cli/net/net.go | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/925c8ca1/cli/net/net.go
----------------------------------------------------------------------
diff --git a/cli/net/net.go b/cli/net/net.go
index 3843673..447df99 100644
--- a/cli/net/net.go
+++ b/cli/net/net.go
@@ -34,6 +34,7 @@ import (
"crypto/tls"
"net"
"time"
+ "strings"
)
type Network struct {
@@ -279,6 +280,15 @@ func VerifyLoginURL(network *Network) error {
if url.Host == "" {
return errors.New("Use login command to set Brooklyn URL with a valid host[:port]")
}
+ if len(strings.Split(url.Host, ":")) < 2 {
+ if url.Scheme == "https" {
+ url.Host += ":443"
+ network.BrooklynUrl = url.String()
+ } else if url.Scheme == "http" {
+ url.Host += ":80"
+ network.BrooklynUrl = url.String()
+ }
+ }
_, err = net.DialTimeout("tcp", url.Host, time.Duration(30) * time.Second)
if err != nil {
return errors.New("Could not connect to " + url.Host)
[2/2] brooklyn-client git commit: This closes #64
Posted by tb...@apache.org.
This closes #64
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/cedb3507
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/cedb3507
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/cedb3507
Branch: refs/heads/master
Commit: cedb35079e43f57b29005b3e87e9bf4722d99828
Parents: 18967df 925c8ca
Author: Thomas Bouron <th...@cloudsoftcorp.com>
Authored: Fri Nov 10 09:29:32 2017 +0000
Committer: Thomas Bouron <th...@cloudsoftcorp.com>
Committed: Fri Nov 10 09:29:32 2017 +0000
----------------------------------------------------------------------
cli/net/net.go | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------