+ if len(e2TermEp) > 0 {
+ r.addRoute_rx_list("RIC_SCTP_CLEAR_ALL", e2ManEp, e2TermEp, routeTable, -1, "")
+ r.addRoute_rx_list("E2_TERM_KEEP_ALIVE_REQ", e2ManEp, e2TermEp, routeTable, -1, "")
+ r.addRoute_rx_list("RIC_E2_SETUP_RESP", e2ManEp, e2TermEp, routeTable, -1, "")
+ r.addRoute_rx_list("RIC_E2_SETUP_FAILURE", e2ManEp, e2TermEp, routeTable, -1, "")
+ r.addRoute_rx_list("RIC_SERVICE_UPDATE_ACK", e2ManEp, e2TermEp, routeTable, -1, "")
+ r.addRoute_rx_list("RIC_SERVICE_UPDATE_FAILURE", e2ManEp, e2TermEp, routeTable, -1, "")
+ r.addRoute_rx_list("RIC_E2NODE_CONFIG_UPDATE_ACK", e2ManEp, e2TermEp, routeTable, -1, "")
+ r.addRoute_rx_list("RIC_E2NODE_CONFIG_UPDATE_FAILURE", e2ManEp, e2TermEp, routeTable, -1, "")
+ r.addRoute_rx_list("RIC_E2_RESET_RESP", e2ManEp, e2TermEp, routeTable, -1, "")
+ }
+}
+
+func (r *Rpe) generatePartialRouteTable(endPointList rtmgr.Endpoints, xappSubData *models.XappSubscriptionData, updatetype rtmgr.RMRUpdateType) *rtmgr.RouteTable {
+ xapp.Logger.Debug("rpe.generatePartialRouteTable invoked")
+ xapp.Logger.Debug("Endpoint List: %v", endPointList)
+ routeTable := &rtmgr.RouteTable{}
+ subManEp := getEndpointByName(&endPointList, "SUBMAN")
+ if subManEp == nil {
+ xapp.Logger.Error("Platform component not found: %v", "Subscription Manager")
+ xapp.Logger.Debug("Endpoints: %v", endPointList)
+ }
+ /*e2TermListEp := getEndpointListByName(&endPointList, "E2TERMINST")
+ if len(e2TermListEp) == 0 {
+ xapp.Logger.Error("Platform component not found: %v", "E2 Termination List")
+ xapp.Logger.Debug("Endpoints: %v", endPointList)
+ }
+ e2ManEp := getEndpointByName(&endPointList, "E2MAN")
+ if e2ManEp == nil {
+ xapp.Logger.Error("Platform component not found: %v", "E2 Manager")
+ xapp.Logger.Debug("Endpoints: %v", endPointList)
+ }*/
+
+ if xappSubData != nil && updatetype == rtmgr.SubsType {
+ xapp.Logger.Info("Updating partial subscription routes")
+ r.generatePartialSubscriptionTable(xappSubData, subManEp, routeTable)
+ }
+ /*if updatetype == rtmgr.XappType {
+ xapp.Logger.Info("Updating partial xapp routes")
+ for _, endPoint := range endPointList {
+ xapp.Logger.Debug("Endpoint: %v, xAppType: %v", endPoint.Name, endPoint.XAppType)
+ if endPoint.XAppType != sbi.PlatformType && (len(endPoint.TxMessages) > 0 || len(endPoint.RxMessages) > 0) {
+ r.generateXappRoutes(endPoint, subManEp, routeTable)
+ r.generateXappToXappRoutes(endPoint, endPointList, routeTable)
+ }
+ }
+ }
+ if updatetype == rtmgr.E2Type {
+ xapp.Logger.Info("Updating partial E2 routes")
+ if len(e2TermListEp) > 0 {
+ r.addRoute_rx_list("RIC_SCTP_CLEAR_ALL", e2ManEp, e2TermListEp, routeTable, -1, "")
+ r.addRoute_rx_list("E2_TERM_KEEP_ALIVE_REQ", e2ManEp, e2TermListEp, routeTable, -1, "")
+ r.addRoute_rx_list("RIC_E2_SETUP_RESP", e2ManEp, e2TermListEp, routeTable, -1, "")
+ r.addRoute_rx_list("RIC_E2_SETUP_FAILURE", e2ManEp, e2TermListEp, routeTable, -1, "")
+ }
+ }*/
+
+ return routeTable
+
+}
+
+func (r *Rpe) generateRouteTable(endPointList rtmgr.Endpoints) *rtmgr.RouteTable {
+ xapp.Logger.Debug("rpe.generateRouteTable invoked")
+ xapp.Logger.Debug("Endpoint List: %v", endPointList)
+ routeTable := &rtmgr.RouteTable{}
+ /*e2TermEp := getEndpointByName(&endPointList, "E2TERM")
+ if e2TermEp == nil {
+ xapp.Logger.Error("Platform component not found: %v", "E2 Termination")
+ xapp.Logger.Debug("Endpoints: %v", endPointList)
+ }*/
+ subManEp := getEndpointByName(&endPointList, "SUBMAN")
+ if subManEp == nil {
+ xapp.Logger.Error("Platform component not found: %v", "Subscription Manager")
+ xapp.Logger.Debug("Endpoints: %v", endPointList)
+ }
+ e2ManEp := getEndpointByName(&endPointList, "E2MAN")
+ if e2ManEp == nil {
+ xapp.Logger.Error("Platform component not found: %v", "E2 Manager")
+ xapp.Logger.Debug("Endpoints: %v", endPointList)
+ }
+ /*rsmEp := getEndpointByName(&endPointList, "RSM")
+ if rsmEp == nil {
+ xapp.Logger.Error("Platform component not found: %v", "Resource Status Manager")
+ xapp.Logger.Debug("Endpoints: %v", endPointList)
+ }*/
+ A1MediatorEp := getEndpointByName(&endPointList, "A1MEDIATOR")
+ if A1MediatorEp == nil {
+ xapp.Logger.Error("Platform component not found: %v", "A1Mediator")
+ xapp.Logger.Debug("Endpoints: %v", endPointList)
+ }
+
+ e2TermListEp := getEndpointListByName(&endPointList, "E2TERMINST")
+ if len(e2TermListEp) == 0 {
+ xapp.Logger.Error("Platform component not found: %v", "E2 Termination List")
+ xapp.Logger.Debug("Endpoints: %v", endPointList)
+ }
+ r.generatePlatformRoutes(e2TermListEp, subManEp, e2ManEp, A1MediatorEp, routeTable)
+
+ for _, endPoint := range endPointList {
+ xapp.Logger.Debug("Endpoint: %v, xAppType: %v", endPoint.Name, endPoint.XAppType)
+ if endPoint.XAppType != sbi.PlatformType && (len(endPoint.TxMessages) > 0 || len(endPoint.RxMessages) > 0) {
+ r.generateXappRoutes(endPoint, subManEp, routeTable)
+ r.generateSubscriptionRoutes(endPoint, subManEp, routeTable)
+ r.generateXappToXappRoutes(endPoint, endPointList, routeTable)
+
+ }
+ }
+ return routeTable