Check DNS lookup for E2T address, RED Button and KEEP alive message routes added... 69/2169/1
authorrangajal <ranjit.angajala@nokia.com>
Wed, 8 Jan 2020 12:18:39 +0000 (12:18 +0000)
committerrangajal <ranjit.angajala@nokia.com>
Wed, 8 Jan 2020 12:18:49 +0000 (12:18 +0000)
Change-Id: I98d9c69993c2795076946a5306dfafbd7fd97b45
Signed-off-by: rangajal <ranjit.angajala@nokia.com>
RELNOTES
container-tag.yaml
pkg/nbi/httprestful.go
pkg/rpe/rpe.go

index edaf372..f0b7a43 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -1,3 +1,6 @@
+### v0.4.7
+* Check DNS lookup for E2T address, RED Button and KEEP alive message routes added for new E2T Address 
+
 ### v0.4.6
 * Static platform routes can be configured via configuration file
 
index 94d6bc0..449899c 100644 (file)
@@ -2,4 +2,4 @@
 # By default this file is in the docker build directory,
 # but the location can configured in the JJB template.
 ---
-tag: 0.4.6
+tag: 0.4.7
index 2e14690..81384c0 100644 (file)
@@ -39,6 +39,7 @@ import (
        "github.com/go-openapi/loads"
        "github.com/go-openapi/runtime/middleware"
        "net/url"
+       "net"
        "os"
        "routing-manager/pkg/models"
        "routing-manager/pkg/restapi"
@@ -172,6 +173,11 @@ func validateE2tData(data *models.E2tData) error {
                return fmt.Errorf("E2T E2TAddress is not a proper format like ip:port, %v", e2taddress_key )
        }
 
+       _, err := net.LookupIP(stringSlice[0])
+       if err != nil {
+               return fmt.Errorf("E2T E2TAddress DNS look up failed, E2TAddress: %v", stringSlice[0])
+        }
+
        if checkValidaE2TAddress(e2taddress_key) {
                return fmt.Errorf("E2TAddress already exist!!!, E2TAddress: %v",e2taddress_key)
        }
index 64b93fe..8ee9b52 100644 (file)
@@ -234,12 +234,14 @@ func (r *Rpe) generatePlatformRoutes(e2TermEp []rtmgr.Endpoint, subManEp *rtmgr.
                case "A1MEDIATOR":
                        Ep = a1mediatorEp
                }
-               if routes.EndPoint == "E2TERMINST" && len(e2TermEp) > 0 {
-                       r.addRoute_rx_list(routes.MessageType, sendEp, e2TermEp, routeTable, routes.SubscriptionId, routes.Meid)
-                       continue
-               }
+
                r.addRoute(routes.MessageType, sendEp, Ep, routeTable, routes.SubscriptionId, routes.Meid)
        }
+
+       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, "")
+       }
 }
 
 func (r *Rpe) generateRouteTable(endPointList rtmgr.Endpoints) *rtmgr.RouteTable {