From: rangajal Date: Tue, 3 Nov 2020 08:57:18 +0000 (+0300) Subject: o1 namespace adaptations X-Git-Tag: 0.5.1~11 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=757f1ec1cfb0fa457bfcf5b4fc9550205cce3510;p=ric-plt%2Fo1.git o1 namespace adaptations Change-Id: Icabeced4e38951193e64d05f2fd0622a7401a376 Signed-off-by: rangajal --- diff --git a/agent/pkg/nbi/nbi.go b/agent/pkg/nbi/nbi.go index 7865f43..8d5bb5f 100755 --- a/agent/pkg/nbi/nbi.go +++ b/agent/pkg/nbi/nbi.go @@ -28,6 +28,7 @@ import ( "strings" "time" "unsafe" + "os" "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp" "gerrit.oran-osc.org/r/ric-plt/o1mediator/pkg/sbi" @@ -269,7 +270,12 @@ func nbiGnbStateCB(session *C.sr_session_ctx_t, module *C.char, xpath *C.char, r log.Info("nbiGnbStateCB: module='%s' xpath='%s' rpath='%s' [id=%d]", mod, C.GoString(xpath), C.GoString(rpath), reqid) if mod == "o-ran-sc-ric-xapp-desc-v1" { - podList, _ := sbiClient.GetAllPodStatus("ricxapp") + xappnamespace := os.Getenv("XAPP_NAMESPACE") + if xappnamespace == "" { + xappnamespace = "ricxapp" + } + podList, _ := sbiClient.GetAllPodStatus(xappnamespace) + for _, pod := range podList { path := fmt.Sprintf("/o-ran-sc-ric-xapp-desc-v1:ric/health/status[name='%s']", pod.Name) nbiClient.CreateNewElement(session, parent, path, "name", path)