Code Review
/
ric-plt
/
rtmgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Adding scope of RICPlatform that are under Apache License"
[ric-plt/rtmgr.git]
/
pkg
/
rpe
/
rmr.go
diff --git
a/pkg/rpe/rmr.go
b/pkg/rpe/rmr.go
index
41c1c4c
..
cb311a8
100644
(file)
--- a/
pkg/rpe/rmr.go
+++ b/
pkg/rpe/rmr.go
@@
-14,6
+14,11
@@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+
+
+ This source code is part of the near-RT RIC (RAN Intelligent Controller)
+ platform project (RICP).
+
==================================================================================
*/
/*
==================================================================================
*/
/*
@@
-34,19
+39,10
@@
type Rmr struct {
Rpe
}
Rpe
}
-type RmrPub struct {
- Rmr
-}
-
type RmrPush struct {
Rmr
}
type RmrPush struct {
Rmr
}
-func NewRmrPub() *RmrPub {
- instance := new(RmrPub)
- return instance
-}
-
func NewRmrPush() *RmrPush {
instance := new(RmrPush)
return instance
func NewRmrPush() *RmrPush {
instance := new(RmrPush)
return instance
@@
-57,15
+53,9
@@
Produces the raw route message consumable by RMR
*/
func (r *Rmr) generateRMRPolicies(eps rtmgr.Endpoints, key string) *[]string {
rawrt := []string{key + "newrt|start\n"}
*/
func (r *Rmr) generateRMRPolicies(eps rtmgr.Endpoints, key string) *[]string {
rawrt := []string{key + "newrt|start\n"}
- rt := r.ge
t
RouteTable(eps)
+ rt := r.ge
nerate
RouteTable(eps)
for _, rte := range *rt {
for _, rte := range *rt {
- rawrte := key //+ "rte|" + rte.MessageType
- if rte.SubID == -1 {
- rawrte += "rte|"
- } else {
- rawrte += "mse|"
- }
- rawrte += rte.MessageType
+ rawrte := key + "mse|" + rte.MessageType
for _, tx := range rte.TxList {
rawrte += "," + tx.Ip + ":" + strconv.Itoa(int(tx.Port))
}
for _, tx := range rte.TxList {
rawrte += "," + tx.Ip + ":" + strconv.Itoa(int(tx.Port))
}
@@
-94,21
+84,11
@@
func (r *Rmr) generateRMRPolicies(eps rtmgr.Endpoints, key string) *[]string {
return &rawrt
}
return &rawrt
}
-func (r *RmrPub) GeneratePolicies(eps rtmgr.Endpoints) *[]string {
- rtmgr.Logger.Debug("Invoked rmr.GeneratePolicies, args: %v: ", eps)
- return r.generateRMRPolicies(eps, "00000 ")
-}
-
func (r *RmrPush) GeneratePolicies(eps rtmgr.Endpoints) *[]string {
rtmgr.Logger.Debug("Invoked rmr.GeneratePolicies, args: %v: ", eps)
return r.generateRMRPolicies(eps, "")
}
func (r *RmrPush) GeneratePolicies(eps rtmgr.Endpoints) *[]string {
rtmgr.Logger.Debug("Invoked rmr.GeneratePolicies, args: %v: ", eps)
return r.generateRMRPolicies(eps, "")
}
-func (r *RmrPub) GetRouteTable(eps rtmgr.Endpoints) *rtmgr.RouteTable {
- return r.getRouteTable(eps)
-}
-
-func (r *RmrPush) GetRouteTable(eps rtmgr.Endpoints) *rtmgr.RouteTable {
- return r.getRouteTable(eps)
+func (r *RmrPush) GenerateRouteTable(eps rtmgr.Endpoints) *rtmgr.RouteTable {
+ return r.generateRouteTable(eps)
}
}
-