RMR updated to v3.6.0 with support for E2 Setup message types 19/2919/1
authorwahidw <abdulwahid.w@nokia.com>
Mon, 23 Mar 2020 11:15:09 +0000 (11:15 +0000)
committerwahidw <abdulwahid.w@nokia.com>
Mon, 23 Mar 2020 11:15:18 +0000 (11:15 +0000)
Change-Id: I0417e82b4296d248be6fc35f8ad32dcce094fef6
Signed-off-by: wahidw <abdulwahid.w@nokia.com>
Dockerfile
RELNOTES
container-tag.yaml
go.mod
pkg/nbi/control.go
pkg/rpe/rpe.go

index 2ccd2d0..2919ebf 100644 (file)
 FROM nexus3.o-ran-sc.org:10004/bldr-ubuntu18-c-go:4-u18.04-nng as rtmgrbuild
 
 # Install RMr shared library
-RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_3.5.0_amd64.deb/download.deb && dpkg -i rmr_3.5.0_amd64.deb && rm -rf rmr_3.5.0_amd64.deb
+ARG RMRVERSION=3.6.0
+RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr_${RMRVERSION}_amd64.deb && rm -rf rmr_${RMRVERSION}_amd64.deb
 # Install RMr development header files
-RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_3.5.0_amd64.deb/download.deb && dpkg -i rmr-dev_3.5.0_amd64.deb && rm -rf rmr-dev_3.5.0_amd64.deb
+RUN wget --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb && rm -rf rmr-dev_${RMRVERSION}_amd64.deb
 
 ENV GOLANG_VERSION 1.12.1
 RUN wget --quiet https://dl.google.com/go/go$GOLANG_VERSION.linux-amd64.tar.gz \
index 8016e3e..dc50594 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -1,3 +1,6 @@
+### v0.5.3
+* RMR updated to v3.6.0 with support for E2 Setup message types
+
 ### v0.5.2
 * Switch to RMR Si95 mode 
 
index b3e924f..71f44c7 100644 (file)
@@ -2,4 +2,4 @@
 # By default this file is in the docker build directory,
 # but the location can configured in the JJB template.
 ---
-tag: 0.5.2
+tag: 0.5.3
diff --git a/go.mod b/go.mod
index 82ba75d..db8af42 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -3,13 +3,13 @@ module routing-manager
 go 1.12.1
 
 require (
-       gerrit.o-ran-sc.org/r/ric-plt/xapp-frame v0.4.0
+       gerrit.o-ran-sc.org/r/ric-plt/xapp-frame v0.4.4
        nanomsg.org/go/mangos/v2 v2.0.5
 )
 
 replace gerrit.o-ran-sc.org/r/ric-plt/sdlgo => gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.2.0
 
-replace gerrit.o-ran-sc.org/r/ric-plt/xapp-frame => gerrit.o-ran-sc.org/r/ric-plt/xapp-frame.git v0.4.0
+replace gerrit.o-ran-sc.org/r/ric-plt/xapp-frame => gerrit.o-ran-sc.org/r/ric-plt/xapp-frame.git v0.4.4
 
 replace gerrit.o-ran-sc.org/r/com/golog => gerrit.o-ran-sc.org/r/com/golog.git v0.0.1
 
index 04c71a4..8d9e6c4 100644 (file)
@@ -25,55 +25,53 @@ package nbi
 import "C"
 
 import (
-        "errors"
-        "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
-        "strconv"
+       "errors"
+       "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
        "routing-manager/pkg/rpe"
        "routing-manager/pkg/rtmgr"
-       "routing-manager/pkg/sdl"
        "routing-manager/pkg/sbi"
+       "routing-manager/pkg/sdl"
+       "strconv"
        "sync"
 )
 
-
 func NewControl() Control {
 
-        return Control{make(chan *xapp.RMRParams)}
+       return Control{make(chan *xapp.RMRParams)}
 }
 
-
 type Control struct {
-        rcChan      chan *xapp.RMRParams
+       rcChan chan *xapp.RMRParams
 }
 
-
 func (c *Control) Run(sbiEngine sbi.Engine, sdlEngine sdl.Engine, rpeEngine rpe.Engine, m *sync.Mutex) {
-        go c.controlLoop(sbiEngine, sdlEngine, rpeEngine, m)
-        xapp.Run(c)
+       go c.controlLoop(sbiEngine, sdlEngine, rpeEngine, m)
+       xapp.Run(c)
 }
 
 func (c *Control) Consume(rp *xapp.RMRParams) (err error) {
-        c.rcChan <- rp
-        return
+       c.rcChan <- rp
+       return
 }
 
 func (c *Control) controlLoop(sbiEngine sbi.Engine, sdlEngine sdl.Engine, rpeEngine rpe.Engine, m *sync.Mutex) {
        for {
                msg := <-c.rcChan
+               xapp_msg := sbi.RMRParams{msg}
                switch msg.Mtype {
                case xapp.RICMessageTypes["RMRRM_REQ_TABLE"]:
-                       if (rtmgr.Rtmgr_ready == false) {
-                                       xapp.Logger.Info("Update Route Table Request(RMR to RM), message discarded as routing manager is not ready")
+                       if rtmgr.Rtmgr_ready == false {
+                               xapp.Logger.Info("Update Route Table Request(RMR to RM), message discarded as routing manager is not ready")
                        } else {
-                                       xapp.Logger.Info("Update Route Table Request(RMR to RM)")
+                               xapp.Logger.Info("Update Route Table Request(RMR to RM)")
                                go c.handleUpdateToRoutingManagerRequest(msg, sbiEngine, sdlEngine, rpeEngine, m)
                        }
                case xapp.RICMessageTypes["RMRRM_TABLE_STATE"]:
-                      xapp.Logger.Info("state of table to route mgr %v", msg)
+                       xapp.Logger.Info("state of table to route mgr %s,payload %s", xapp_msg.String(), msg.Payload)
 
                default:
-                       err := errors.New("Message Type " + strconv.Itoa(msg.Mtype) + " is discarded")
-                       xapp.Logger.Error("Unknown message type: %v", err)
+                       err := errors.New("Message Type " + strconv.Itoa(msg.Mtype) + " is discarded")
+                       xapp.Logger.Error("Unknown message type: %v", err)
                }
        }
 }
@@ -95,7 +93,7 @@ func (c *Control) handleUpdateToRoutingManagerRequest(params *xapp.RMRParams, sb
 
        ep := sbiEngine.CreateEndpoint(string(params.Payload))
        if ep == nil {
-               xapp.Logger.Error("Update Routing Table Request can't handle due to end point %s is not avail in complete ep list: ",string(params.Payload))
+               xapp.Logger.Error("Update Routing Table Request can't handle due to end point %s is not avail in complete ep list: ", string(params.Payload))
                return
        }
 
index b5c6961..d26a704 100644 (file)
@@ -244,6 +244,8 @@ func (r *Rpe) generatePlatformRoutes(e2TermEp []rtmgr.Endpoint, subManEp *rtmgr.
        if len(e2TermEp) > 0 {
                r.addRoute_rx_list("RIC_SCTP_CLEAR_ALL", e2ManEp, e2TermEp, routeTable, -1, "")
                r.addRoute_rx_list("E2_TERM_KEEP_ALIVE_REQ", e2ManEp, e2TermEp, routeTable, -1, "")
+               r.addRoute_rx_list("RIC_E2_SETUP_RESP", e2ManEp, e2TermEp, routeTable, -1, "")
+               r.addRoute_rx_list("RIC_E2_SETUP_FAILURE", e2ManEp, e2TermEp, routeTable, -1, "")
        }
 }