X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fcontrol%2Frestendpoint.go;h=dc565d43db6e4a921b93bb0fe8ecba4fda13d4fd;hb=9c4697fa22fae79ac923e72f417ecbebf1c1e4d6;hp=59c30d01772284f91512e77c59d56b1454b33fbe;hpb=316d8a176feac5e67dcaa360c0f5996e87b32904;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/restendpoint.go b/pkg/control/restendpoint.go index 59c30d0..dc565d4 100644 --- a/pkg/control/restendpoint.go +++ b/pkg/control/restendpoint.go @@ -40,8 +40,13 @@ func ConstructEndpointAddresses(clientEndpoint models.SubscriptionParamsClientEn var xAppHTTPEndPoint string var xAppRMREndPoint string - if host == "" || (HTTP_port == 0 && RMR_port == 0) { - err := fmt.Errorf("ClientEndpoint aprovided no PORT numbers") + if host == "" { + err := fmt.Errorf("ClientEndpoint provided without HOST name") + return "", "", err + } + + if HTTP_port == 0 && RMR_port == 0 { + err := fmt.Errorf("ClientEndpoint provided without PORT numbers") return "INVALID_HTTP_ADDRESS:" + host + (string)(*clientEndpoint.HTTPPort), "INVALID_RMR_ADDRESS:" + host + (string)(*clientEndpoint.RMRPort), err @@ -57,7 +62,7 @@ func ConstructEndpointAddresses(clientEndpoint models.SubscriptionParamsClientEn xAppRMREndPoint = host + ":" + strconv.FormatInt(*clientEndpoint.RMRPort, 10) } - xapp.Logger.Info("xAppHttpEndPoint=%v, xAppRrmEndPoint=%v", xAppHTTPEndPoint, xAppRMREndPoint) + xapp.Logger.Debug("xAppHttpEndPoint=%v, xAppRrmEndPoint=%v", xAppHTTPEndPoint, xAppRMREndPoint) return xAppHTTPEndPoint, xAppRMREndPoint, nil }