From: rangajal Date: Tue, 3 Nov 2020 17:35:40 +0000 (+0300) Subject: xapp-frame namespace changes X-Git-Tag: v0.5.12^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=fd34786fa6e250c4e7cde11abd655c2a72be6494;p=ric-plt%2Fxapp-frame.git xapp-frame namespace changes Change-Id: I31657cb000b71deec35bd86f5d566911a8325b40 Signed-off-by: rangajal --- diff --git a/pkg/xapp/subscription.go b/pkg/xapp/subscription.go index 27485dd..4dcf22b 100755 --- a/pkg/xapp/subscription.go +++ b/pkg/xapp/subscription.go @@ -31,6 +31,7 @@ import ( "io/ioutil" "net" "net/http" + "os" "time" apiclient "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientapi" @@ -66,7 +67,11 @@ type Subscriber struct { func NewSubscriber(host string, timo int) *Subscriber { if host == "" { - host = "service-ricplt-submgr-http.ricplt:8088" + pltnamespace := os.Getenv("PLT_NAMESPACE") + if pltnamespace == "" { + pltnamespace = "ricplt" + } + host = fmt.Sprintf("service-%s-submgr-http.%s:8088", pltnamespace, pltnamespace) } if timo == 0 {