Code Review
/
ric-plt
/
submgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Upgrade RMR to v4.7.4
[ric-plt/submgr.git]
/
pkg
/
teststub
/
rmrenv.go
diff --git
a/pkg/teststub/rmrenv.go
b/pkg/teststub/rmrenv.go
index
5a57b56
..
4b1f1b7
100644
(file)
--- a/
pkg/teststub/rmrenv.go
+++ b/
pkg/teststub/rmrenv.go
@@
-20,7
+20,6
@@
package teststub
import (
package teststub
import (
- "gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/xapptweaks"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
"os"
"strconv"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
"os"
"strconv"
@@
-53,9
+52,9
@@
func (rrt *RmrRouteTable) AddRoute(mtype int, src string, subid int, trg string)
func (rrt *RmrRouteTable) AddMeid(trg string, meids []string) {
line := "mme_ar"
func (rrt *RmrRouteTable) AddMeid(trg string, meids []string) {
line := "mme_ar"
- line += "
|
"
+ line += "
|
"
line += trg
line += trg
- line += "
|
"
+ line += "
|
"
for _, str := range meids {
line += " " + str
}
for _, str := range meids {
line += " " + str
}
@@
-65,7
+64,7
@@
func (rrt *RmrRouteTable) AddMeid(trg string, meids []string) {
func (rrt *RmrRouteTable) DelMeid(meids []string) {
line := "mme_del"
func (rrt *RmrRouteTable) DelMeid(meids []string) {
line := "mme_del"
- line += "
|
"
+ line += "
|
"
for _, str := range meids {
line += " " + str
}
for _, str := range meids {
line += " " + str
}
@@
-82,6
+81,7
@@
func (rrt *RmrRouteTable) Table() string {
allrt += val + "\n"
}
allrt += "newrt|end\n"
allrt += val + "\n"
}
allrt += "newrt|end\n"
+ allrt += "\n"
allrt += "meid_map | start\n"
for _, val := range rrt.meids {
allrt += val + "\n"
allrt += "meid_map | start\n"
for _, val := range rrt.meids {
allrt += val + "\n"
@@
-91,11
+91,11
@@
func (rrt *RmrRouteTable) Table() string {
}
func (rrt *RmrRouteTable) Enable() {
}
func (rrt *RmrRouteTable) Enable() {
- if len(rrt.tmpfile)
>
0 {
-
os.Remove(rrt.tmpfile
)
+ if len(rrt.tmpfile)
==
0 {
+
rrt.tmpfile, _ = CreateTmpFile(rrt.Table()
)
}
}
- rrt.tmpfile, _ = CreateTmpFile(rrt.Table())
os.Setenv("RMR_SEED_RT", rrt.tmpfile)
os.Setenv("RMR_SEED_RT", rrt.tmpfile)
+ os.Setenv("RMR_RTG_SVC", "-1")
xapp.Logger.Info("Using rt file %s", os.Getenv("RMR_SEED_RT"))
}
xapp.Logger.Info("Using rt file %s", os.Getenv("RMR_SEED_RT"))
}
@@
-103,6
+103,7
@@
func (rrt *RmrRouteTable) Disable() {
if len(rrt.tmpfile) > 0 {
os.Remove(rrt.tmpfile)
os.Unsetenv("RMR_SEED_RT")
if len(rrt.tmpfile) > 0 {
os.Remove(rrt.tmpfile)
os.Unsetenv("RMR_SEED_RT")
+ os.Unsetenv("RMR_RTG_SVC")
rrt.tmpfile = ""
xapp.Logger.Info("Not using rt file ")
}
rrt.tmpfile = ""
xapp.Logger.Info("Not using rt file ")
}
@@
-113,7
+114,7
@@
func (rrt *RmrRouteTable) Disable() {
//-----------------------------------------------------------------------------
type RmrSrcId struct {
//-----------------------------------------------------------------------------
type RmrSrcId struct {
- xapp
tweaks
.RmrEndpoint
+ xapp.RmrEndpoint
}
func (rsi *RmrSrcId) Enable() {
}
func (rsi *RmrSrcId) Enable() {
@@
-132,7
+133,7
@@
func (rsi *RmrSrcId) Disable() {
//
//-----------------------------------------------------------------------------
type RmrRtgSvc struct {
//
//-----------------------------------------------------------------------------
type RmrRtgSvc struct {
- xapp
tweaks
.RmrEndpoint
+ xapp.RmrEndpoint
}
func (rrs *RmrRtgSvc) Enable() {
}
func (rrs *RmrRtgSvc) Enable() {