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"
func (rrt *RmrRouteTable) AddMeid(trg string, meids []string) {
line := "mme_ar"
- line += "|"
+ line += " | "
line += trg
- line += "|"
+ line += " | "
for _, str := range meids {
line += " " + str
}
func (rrt *RmrRouteTable) DelMeid(meids []string) {
line := "mme_del"
- line += "|"
+ line += " | "
for _, str := range meids {
line += " " + str
}
allrt += val + "\n"
}
allrt += "newrt|end\n"
+ allrt += "\n"
allrt += "meid_map | start\n"
for _, val := range rrt.meids {
allrt += val + "\n"
}
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_RTG_SVC", "-1")
xapp.Logger.Info("Using rt file %s", os.Getenv("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 ")
}
//-----------------------------------------------------------------------------
type RmrSrcId struct {
- xapptweaks.RmrEndpoint
+ xapp.RmrEndpoint
}
func (rsi *RmrSrcId) Enable() {
//
//-----------------------------------------------------------------------------
type RmrRtgSvc struct {
- xapptweaks.RmrEndpoint
+ xapp.RmrEndpoint
}
func (rrs *RmrRtgSvc) Enable() {