Adding scope of RICPlatform that are under Apache License
[ric-plt/rtmgr.git] / pkg / rpe / rmr.go
index 41c1c4c..cb311a8 100644 (file)
    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
 }
 
-type RmrPub struct {
-       Rmr
-}
-
 type RmrPush struct {
        Rmr
 }
 
-func NewRmrPub() *RmrPub {
-       instance := new(RmrPub)
-       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"}
-       rt := r.getRouteTable(eps)
+       rt := r.generateRouteTable(eps)
        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))
                }
@@ -94,21 +84,11 @@ func (r *Rmr) generateRMRPolicies(eps rtmgr.Endpoints, key string) *[]string {
        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 *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)
 }
-