RIC-851: Updated rtmgr to create xapp routes 86/10286/14
authorgunjarastogi <gunja.rastogi@capgemini.com>
Wed, 18 Jan 2023 11:59:04 +0000 (17:29 +0530)
committerczichy <thoralf.czichy@nokia.com>
Wed, 15 Feb 2023 07:31:04 +0000 (09:31 +0200)
from subscription manager for
Is_Subscription_Delete_Required procedure

Signed-off-by: gunjarastogi <gunja.rastogi@capgemini.com>
Change-Id: Ia45a9f252aedd0a3f3987328fcf7596508e1badf

Dockerfile
go.mod
go.sum
pkg/rpe/rpe.go

index 70dcdcb..cdfc8eb 100644 (file)
@@ -27,7 +27,7 @@ FROM nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-ubuntu20-c-go:1.0.0 as rtmgrbuild
 
 RUN apt update && apt install ca-certificates libgnutls30 -y
 # Install RMr shared library
-ARG RMRVERSION=4.8.5
+ARG RMRVERSION=4.9.0
 RUN wget --content-disposition https://packagecloud.io/o-ran-sc/release/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/release/packages/debian/stretch/rmr-dev_${RMRVERSION}_amd64.deb/download.deb && dpkg -i rmr-dev_${RMRVERSION}_amd64.deb && rm -rf rmr-dev_${RMRVERSION}_amd64.deb
@@ -70,6 +70,7 @@ COPY "uta_rtg_ric.rt" /
 ENV GOPATH /go
 
 ENV GOBIN /go/bin
+RUN go mod download
 RUN go install ./cmd/rtmgr.go
 
 # UT intermediate container
diff --git a/go.mod b/go.mod
index 4771cf3..44ab0fc 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module routing-manager
 go 1.17
 
 require (
-       gerrit.o-ran-sc.org/r/ric-plt/xapp-frame v0.9.1
+       gerrit.o-ran-sc.org/r/ric-plt/xapp-frame v0.9.16
        github.com/ghodss/yaml v1.0.0
        github.com/go-openapi/loads v0.19.4
        github.com/go-openapi/runtime v0.19.4
@@ -14,59 +14,60 @@ require (
 
 require (
        gerrit.o-ran-sc.org/r/com/golog v0.0.2 // indirect
-       gerrit.o-ran-sc.org/r/ric-plt/alarm-go.git/alarm v0.5.0 // indirect
-       gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common v1.2.1 // indirect
-       gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.1 // indirect
-       gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.1 // indirect
-       gerrit.o-ran-sc.org/r/ric-plt/sdlgo v0.7.0 // indirect
-       github.com/PuerkitoBio/purell v1.1.1 // indirect
-       github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
-       github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
-       github.com/beorn7/perks v1.0.0 // indirect
-       github.com/davecgh/go-spew v1.1.1 // indirect
-       github.com/docker/go-units v0.4.0 // indirect
-       github.com/fsnotify/fsnotify v1.4.9 // indirect
-       github.com/go-openapi/analysis v0.19.5 // indirect
-       github.com/go-openapi/errors v0.19.3 // indirect
-       github.com/go-openapi/jsonpointer v0.19.3 // indirect
-       github.com/go-openapi/jsonreference v0.19.3 // indirect
-       github.com/go-openapi/spec v0.19.3 // indirect
-       github.com/go-openapi/validate v0.19.6 // indirect
-       github.com/go-redis/redis v6.15.9+incompatible // indirect
-       github.com/go-stack/stack v1.8.0 // indirect
-       github.com/golang/protobuf v1.4.2 // indirect
-       github.com/gorilla/mux v1.7.1 // indirect
-       github.com/hashicorp/hcl v1.0.0 // indirect
-       github.com/jessevdk/go-flags v1.4.0 // indirect
-       github.com/kr/pretty v0.2.0 // indirect
-       github.com/magiconair/properties v1.8.1 // indirect
-       github.com/mailru/easyjson v0.7.0 // indirect
-       github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
-       github.com/mitchellh/mapstructure v1.3.2 // indirect
-       github.com/pelletier/go-toml v1.8.0 // indirect
-       github.com/pmezard/go-difflib v1.0.0 // indirect
-       github.com/prometheus/client_golang v0.9.3 // indirect
-       github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
-       github.com/prometheus/common v0.4.0 // indirect
-       github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 // indirect
-       github.com/spf13/afero v1.2.2 // indirect
-       github.com/spf13/cast v1.3.1 // indirect
-       github.com/spf13/jwalterweatherman v1.1.0 // indirect
-       github.com/spf13/pflag v1.0.5 // indirect
-       github.com/stretchr/objx v0.2.0 // indirect
-       github.com/stretchr/testify v1.5.1 // indirect
-       go.mongodb.org/mongo-driver v1.1.2 // indirect
-       golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 // indirect
-       golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 // indirect
-       golang.org/x/text v0.3.2 // indirect
-       google.golang.org/protobuf v1.23.0 // indirect
-       gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
-       gopkg.in/yaml.v2 v2.3.0 // indirect
-       k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
+        gerrit.o-ran-sc.org/r/ric-plt/alarm-go.git/alarm v0.5.0 // indirect
+        gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common v1.2.1 // indirect
+        gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.2.1 // indirect
+        gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.1 // indirect
+        gerrit.o-ran-sc.org/r/ric-plt/sdlgo v0.7.0 // indirect
+        github.com/PuerkitoBio/purell v1.1.1 // indirect
+        github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
+        github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
+        github.com/beorn7/perks v1.0.0 // indirect
+        github.com/davecgh/go-spew v1.1.1 // indirect
+        github.com/docker/go-units v0.4.0 // indirect
+        github.com/fsnotify/fsnotify v1.4.9 // indirect
+        github.com/go-openapi/analysis v0.19.5 // indirect
+        github.com/go-openapi/errors v0.19.3 // indirect
+        github.com/go-openapi/jsonpointer v0.19.3 // indirect
+        github.com/go-openapi/jsonreference v0.19.3 // indirect
+        github.com/go-openapi/spec v0.19.3 // indirect
+        github.com/go-openapi/validate v0.19.6 // indirect
+        github.com/go-redis/redis v6.15.9+incompatible // indirect
+        github.com/go-stack/stack v1.8.0 // indirect
+        github.com/golang/protobuf v1.4.2 // indirect
+        github.com/gorilla/mux v1.7.1 // indirect
+        github.com/hashicorp/hcl v1.0.0 // indirect
+        github.com/jessevdk/go-flags v1.4.0 // indirect
+        github.com/kr/pretty v0.2.0 // indirect
+        github.com/magiconair/properties v1.8.1 // indirect
+        github.com/mailru/easyjson v0.7.0 // indirect
+        github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
+        github.com/mitchellh/mapstructure v1.3.2 // indirect
+        github.com/pelletier/go-toml v1.8.0 // indirect
+        github.com/pmezard/go-difflib v1.0.0 // indirect
+        github.com/prometheus/client_golang v0.9.3 // indirect
+        github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
+        github.com/prometheus/common v0.4.0 // indirect
+        github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 // indirect
+        github.com/spf13/afero v1.2.2 // indirect
+        github.com/spf13/cast v1.3.1 // indirect
+        github.com/spf13/jwalterweatherman v1.1.0 // indirect
+        github.com/spf13/pflag v1.0.5 // indirect
+        github.com/stretchr/objx v0.2.0 // indirect
+        github.com/stretchr/testify v1.5.1 // indirect
+        go.mongodb.org/mongo-driver v1.1.2 // indirect
+        golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 // indirect
+        golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 // indirect
+        golang.org/x/text v0.3.2 // indirect
+        google.golang.org/protobuf v1.23.0 // indirect
+        gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
+        gopkg.in/yaml.v2 v2.3.0 // indirect
+        k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
+
 )
 
 replace gerrit.o-ran-sc.org/r/ric-plt/sdlgo => gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.8.0
 
-replace gerrit.o-ran-sc.org/r/ric-plt/xapp-frame => gerrit.o-ran-sc.org/r/ric-plt/xapp-frame.git v0.9.1
+replace gerrit.o-ran-sc.org/r/ric-plt/xapp-frame => gerrit.o-ran-sc.org/r/ric-plt/xapp-frame.git v0.9.16
 
 replace gerrit.o-ran-sc.org/r/com/golog => gerrit.o-ran-sc.org/r/com/golog.git v0.0.2
diff --git a/go.sum b/go.sum
index 6b63275..82f5c38 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -11,8 +11,8 @@ gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.1 h1:BG3kste8PLVTG0m8CR
 gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.2.1/go.mod h1:zX8rW6YEsagHrRGVW5YO50Ku/Csrpzsuvblhr4DbYi4=
 gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.8.0 h1:H7GtCRC+pGn6oOxYalUZr7LinQX5jQCVa+ConX7PB5Q=
 gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.8.0/go.mod h1:KCHu4JkWnw2Ro6P747wU9S2t7zxFLmBNCiYvGZo3CHo=
-gerrit.o-ran-sc.org/r/ric-plt/xapp-frame.git v0.9.1 h1:qutjgf6QMlpcAG8JPwQiCnLczoTosVjCRCRh5nsGZsM=
-gerrit.o-ran-sc.org/r/ric-plt/xapp-frame.git v0.9.1/go.mod h1:foKMPQZ+RlM0Pos2GlEPAg6ux7Y9PRQmCUglYM7/Qt8=
+gerrit.o-ran-sc.org/r/ric-plt/xapp-frame.git v0.9.16 h1:sXJSaCU8m2CXqX5JnqWAfV8hlM6snPfVihkHS/ygM2A=
+gerrit.o-ran-sc.org/r/ric-plt/xapp-frame.git v0.9.16/go.mod h1:M8cnd1lgNS0Rtf9X/bD+jYoHg1Uee5gpdt4Fv46EkKM=
 github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
index 44c255a..f68a748 100644 (file)
@@ -195,7 +195,7 @@ func (r *Rpe) generateXappToXappRoutes(RecvxAppEp *rtmgr.Endpoint, endPointList
                identicalMsg := false
                var RxGrp []rtmgr.Endpoint
                xapp.Logger.Debug("RecvxAppEp.RxMessages Endpoint: %v, xAppType: %v and rxmsg: %v ", RecvxAppEp.Name, RecvxAppEp.XAppType, rxmsg)
-               if rxmsg != "RIC_SUB_RESP" && rxmsg != "RIC_SUB_FAILURE" && rxmsg != "RIC_SUB_DEL_RESP" && rxmsg != "RIC_SUB_DEL_FAILURE" && rxmsg != "RIC_INDICATION" && rxmsg != "RIC_CONTROL_ACK" && rxmsg != "RIC_CONTROL_FAILURE" && rxmsg != "A1_POLICY_REQ" {
+               if rxmsg != "RIC_SUB_RESP" && rxmsg != "RIC_SUB_FAILURE" && rxmsg != "RIC_SUB_DEL_RESP" && rxmsg != "RIC_SUB_DEL_FAILURE" && rxmsg != "RIC_INDICATION" && rxmsg != "RIC_CONTROL_ACK" && rxmsg != "RIC_CONTROL_FAILURE" && rxmsg != "A1_POLICY_REQ" && rxmsg != "RIC_SUB_DEL_REQUIRED" {
                        for _, SrcxAppEp := range endPointList {
                                if SrcxAppEp.XAppType != sbi.PlatformType && (len(SrcxAppEp.TxMessages) > 0) && SrcxAppEp.Name != RecvxAppEp.Name {
                                        for _, txmsg := range SrcxAppEp.TxMessages {
@@ -249,6 +249,7 @@ func (r *Rpe) generateSubscriptionRoutes(selectedxAppEp *rtmgr.Endpoint, subManE
                                r.addRoute("RIC_SUB_FAILURE", subManEp, xAppEp, routeTable, subscription.SubID, "")
                                r.addRoute("RIC_SUB_DEL_RESP", subManEp, xAppEp, routeTable, subscription.SubID, "")
                                r.addRoute("RIC_SUB_DEL_FAILURE", subManEp, xAppEp, routeTable, subscription.SubID, "")
+
                                //E2 Termination -> xApp
                                r.addRoute("RIC_INDICATION", nil, xAppEp, routeTable, subscription.SubID, "")
                                r.addRoute("RIC_CONTROL_ACK", nil, xAppEp, routeTable, subscription.SubID, "")
@@ -271,6 +272,7 @@ func (r *Rpe) generatePartialSubscriptionTable(xappSubData *models.XappSubscript
                r.addRoute("RIC_SUB_FAILURE", subManEp, xAppEp, routeTable, *xappSubData.SubscriptionID, "")
                r.addRoute("RIC_SUB_DEL_RESP", subManEp, xAppEp, routeTable, *xappSubData.SubscriptionID, "")
                r.addRoute("RIC_SUB_DEL_FAILURE", subManEp, xAppEp, routeTable, *xappSubData.SubscriptionID, "")
+
                //E2 Termination -> xApp
                r.addRoute("RIC_INDICATION", nil, xAppEp, routeTable, *xappSubData.SubscriptionID, "")
                r.addRoute("RIC_CONTROL_ACK", nil, xAppEp, routeTable, *xappSubData.SubscriptionID, "")