MEID tableupdated incrementally rather than full update
Change-Id: I9c58deb0ed79ddb0a3692427248469794581361a
Signed-off-by: wahidw <abdulwahid.w@nokia.com>
diff --git a/RELNOTES b/RELNOTES
index f0b7a43..9371ae0 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -1,3 +1,6 @@
+### v0.4.8
+* Entry in meid map will only contain the delta change
+
### v0.4.7
* Check DNS lookup for E2T address, RED Button and KEEP alive message routes added for new E2T Address
diff --git a/container-tag.yaml b/container-tag.yaml
index 449899c..7286906 100644
--- a/container-tag.yaml
+++ b/container-tag.yaml
@@ -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.7
+tag: 0.4.8
diff --git a/pkg/nbi/httprestful.go b/pkg/nbi/httprestful.go
index 81384c0..1d5e1fa 100644
--- a/pkg/nbi/httprestful.go
+++ b/pkg/nbi/httprestful.go
@@ -99,8 +99,9 @@
return nil, nil
}
-func recvNewE2Tdata(dataChannel <-chan *models.E2tData) (*rtmgr.E2TInstance, error) {
+func recvNewE2Tdata(dataChannel <-chan *models.E2tData) (*rtmgr.E2TInstance,string,error) {
var e2tData *models.E2tData
+ var str string
xapp.Logger.Info("data received")
e2tData = <-dataChannel
@@ -111,18 +112,24 @@
Ranlist : make([]string, len(e2tData.RanNamelist)),
}
- e2tinst.Fqdn = *e2tData.E2TAddress
- e2tinst.Name = "E2TERMINST"
- copy(e2tinst.Ranlist, e2tData.RanNamelist)
-
- return &e2tinst,nil
+ e2tinst.Fqdn = *e2tData.E2TAddress
+ e2tinst.Name = "E2TERMINST"
+ copy(e2tinst.Ranlist, e2tData.RanNamelist)
+ if (len(e2tData.RanNamelist) > 0) {
+ var meidar string
+ for _, meid := range e2tData.RanNamelist {
+ meidar += meid + " "
+ }
+ str = "mme_ar|" + *e2tData.E2TAddress + "|" + strings.TrimSuffix(meidar," ")
+ }
+ return &e2tinst,str,nil
} else {
xapp.Logger.Info("No data")
}
xapp.Logger.Debug("Nothing received on the Http interface")
- return nil, nil
+ return nil,str,nil
}
func validateXappCallbackData(callbackData *models.XappCallbackData) error {
@@ -552,10 +559,10 @@
for {
xapp.Logger.Debug("received create New E2T data")
- data, _ := r.RecvNewE2Tdata(e2taddchan)
+ data, meiddata,_ := r.RecvNewE2Tdata(e2taddchan)
if data != nil {
m.Lock()
- sdlEngine.WriteNewE2TInstance(fileName, data)
+ sdlEngine.WriteNewE2TInstance(fileName, data,meiddata)
m.Unlock()
triggerSBI <- true
}
diff --git a/pkg/nbi/httprestful_test.go b/pkg/nbi/httprestful_test.go
index e1a3ae3..e0bfb28 100644
--- a/pkg/nbi/httprestful_test.go
+++ b/pkg/nbi/httprestful_test.go
@@ -477,14 +477,14 @@
E2TAddress: swag.String(""),
}
dataChannel := make(chan *models.E2tData, 10)
- go func() { _, _ = recvNewE2Tdata(dataChannel) }()
+ go func() { _, _,_ = recvNewE2Tdata(dataChannel) }()
defer close(dataChannel)
dataChannel <- &data2
}
func TestE2TChannelwithNoData(t *testing.T) {
dataChannel := make(chan *models.E2tData, 10)
- go func() { _, _ = recvNewE2Tdata(dataChannel) }()
+ go func() { _, _ ,_= recvNewE2Tdata(dataChannel) }()
defer close(dataChannel)
}
diff --git a/pkg/nbi/types.go b/pkg/nbi/types.go
index 085486c..1acf09c 100644
--- a/pkg/nbi/types.go
+++ b/pkg/nbi/types.go
@@ -39,7 +39,7 @@
type FetchAllXAppsHandler func(string) (*[]rtmgr.XApp, error)
type RecvXappCallbackDataHandler func(<-chan *models.XappCallbackData) (*[]rtmgr.XApp, error)
-type RecvNewE2TdataHandler func(<-chan *models.E2tData) (*rtmgr.E2TInstance, error)
+type RecvNewE2TdataHandler func(<-chan *models.E2tData) (*rtmgr.E2TInstance, string, error)
type LaunchRestHandler func(*string, chan<- *models.XappCallbackData, chan<- *models.XappSubscriptionData, chan<- *models.XappSubscriptionData, chan<- *models.E2tData, chan<- models.RanE2tMap, chan<- models.RanE2tMap, chan<- *models.E2tDeleteData)
type ProvideXappHandleHandlerImpl func(chan<- *models.XappCallbackData, *models.XappCallbackData) error
type RetrieveStartupDataHandler func(string, string, string, string, sdl.Engine) error
diff --git a/pkg/rpe/rmr.go b/pkg/rpe/rmr.go
index 80323a3..860c1eb 100644
--- a/pkg/rpe/rmr.go
+++ b/pkg/rpe/rmr.go
@@ -34,7 +34,7 @@
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
"routing-manager/pkg/rtmgr"
"strconv"
- "strings"
+ //"strings"
)
type Rmr struct {
@@ -88,7 +88,7 @@
}
rawrt = append(rawrt, key+"newrt|end\n")
count := 0
- meidrt := key +"meid_map|start\n"
+/* meidrt := key +"meid_map|start\n"
for e2tkey, value := range rcs.E2Ts {
xapp.Logger.Debug("rmr.E2T Key: %v", e2tkey)
xapp.Logger.Debug("rmr.E2T Value: %v", value)
@@ -101,6 +101,12 @@
xapp.Logger.Debug("rmr.E2T Empty RAN LIST for FQDN: %v", e2tkey)
}
}
+ meidrt += key+"meid_map|end|" + strconv.Itoa(count) +"\n" */
+ meidrt := key +"meid_map|start\n"
+ for _, value := range rcs.MeidMap {
+ meidrt += key + value + "\n"
+ count++
+ }
meidrt += key+"meid_map|end|" + strconv.Itoa(count) +"\n"
rawrt = append(rawrt, meidrt)
diff --git a/pkg/rtmgr/types.go b/pkg/rtmgr/types.go
index 9378656..91a8aeb 100644
--- a/pkg/rtmgr/types.go
+++ b/pkg/rtmgr/types.go
@@ -99,6 +99,7 @@
type RicComponents struct {
XApps []XApp
E2Ts map [string]E2TInstance
+ MeidMap []string
Pcs PlatformComponents
}
diff --git a/pkg/sdl/file.go b/pkg/sdl/file.go
index 969f7bd..7ac6594 100644
--- a/pkg/sdl/file.go
+++ b/pkg/sdl/file.go
@@ -34,6 +34,7 @@
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
"io/ioutil"
"os"
+ "strings"
"routing-manager/pkg/rtmgr"
"routing-manager/pkg/models"
)
@@ -112,7 +113,7 @@
return nil
}
-func (f *File) WriteNewE2TInstance(file string, E2TInst *rtmgr.E2TInstance) error {
+func (f *File) WriteNewE2TInstance(file string, E2TInst *rtmgr.E2TInstance,meiddata string) error {
xapp.Logger.Debug("Invoked sdl.WriteNewE2TInstance")
xapp.Logger.Debug("file.WriteNewE2TInstance writes into file: " + file)
xapp.Logger.Debug("file.WriteNewE2TInstance writes data: %v", *E2TInst)
@@ -123,6 +124,12 @@
return errors.New("cannot read full ric data to modify xApps data, due to: " + err.Error())
}
ricData.E2Ts[E2TInst.Fqdn] = *E2TInst
+ if (len(meiddata) > 0){
+ ricData.MeidMap = []string {meiddata}
+ } else {
+ ricData.MeidMap = []string {}
+ }
+
byteValue, err := json.Marshal(ricData)
if err != nil {
@@ -145,8 +152,17 @@
xapp.Logger.Error("cannot get data from sdl interface due to: " + err.Error())
return errors.New("cannot read full ric data to modify xApps data, due to: " + err.Error())
}
+
+ ricData.MeidMap = []string{}
for _, element := range rane2tmap {
xapp.Logger.Info("data received")
+ var str,meidar string
+ for _, meid := range element.RanNamelist {
+ meidar += meid + " "
+ }
+ str = "mme_ar|" + *element.E2TAddress + "|" + strings.TrimSuffix(meidar," ")
+ ricData.MeidMap = append(ricData.MeidMap,str)
+
for key, _ := range ricData.E2Ts {
if key == *element.E2TAddress {
var estObj rtmgr.E2TInstance
@@ -178,8 +194,18 @@
xapp.Logger.Error("cannot get data from sdl interface due to: " + err.Error())
return errors.New("cannot read full ric data to modify xApps data, due to: " + err.Error())
}
+
+ var str,meiddel,meiddisdel string
+ ricData.MeidMap = []string{}
for _, element := range disassranmap {
xapp.Logger.Info("data received")
+ for _, meid := range element.RanNamelist {
+ meiddisdel += meid + " "
+ }
+ if ( len(element.RanNamelist) > 0 ) {
+ str = "mme_del|" + strings.TrimSuffix(meiddisdel," ")
+ ricData.MeidMap = append(ricData.MeidMap,str)
+ }
e2taddress_key := *element.E2TAddress
//Check whether the provided E2T Address is available in SDL as a key.
//If exist, proceed further to check RAN list, Otherwise move to next E2T Instance
@@ -189,7 +215,13 @@
// If RAN list is empty, then routing manager assumes that all RANs attached associated to the particular E2T Instance to be removed.
if len(element.RanNamelist) == 0 {
xapp.Logger.Debug("RAN List is empty. So disassociating all RANs from the E2T Instance: %v ", *element.E2TAddress)
- estObj.Ranlist = []string{}
+ for _, meid := range estObj.Ranlist {
+ meiddel += meid + " "
+ }
+ str = "mme_del|" + strings.TrimSuffix(meiddel," ")
+ ricData.MeidMap = append(ricData.MeidMap,str)
+
+ estObj.Ranlist = []string{}
} else {
xapp.Logger.Debug("Remove only selected rans from E2T Instance: %v and %v ", ricData.E2Ts[e2taddress_key].Ranlist, element.RanNamelist)
for _, disRanValue := range element.RanNamelist {
@@ -230,11 +262,35 @@
return errors.New("cannot read full ric data to modify xApps data, due to: " + err.Error())
}
+
+ ricData.MeidMap = []string {}
+ var delrow,meiddel string
+ if(len(E2TInst.RanNamelistTobeDissociated)>0) {
+ for _, meid := range E2TInst.RanNamelistTobeDissociated {
+ meiddel += meid + " "
+ }
+ delrow = "mme_del|" + strings.TrimSuffix(meiddel," ")
+ ricData.MeidMap = append(ricData.MeidMap,delrow)
+ } else {
+ if(len(ricData.E2Ts[*E2TInst.E2TAddress].Ranlist) > 0) {
+ for _, meid := range ricData.E2Ts[*E2TInst.E2TAddress].Ranlist {
+ meiddel += meid + " "
+ }
+ delrow = "mme_del|" + strings.TrimSuffix(meiddel," ")
+ ricData.MeidMap = append(ricData.MeidMap,delrow)
+ }
+ }
+
delete(ricData.E2Ts, *E2TInst.E2TAddress)
-
for _, element := range E2TInst.RanAssocList {
+ var str,meidar string
xapp.Logger.Info("data received")
+ for _, meid := range element.RanNamelist {
+ meidar = meid + " "
+ }
+ str = "mme_ar|" + *element.E2TAddress + "|" + strings.TrimSuffix(meidar," ")
+ ricData.MeidMap = append(ricData.MeidMap,str)
key := *element.E2TAddress
if val, ok := ricData.E2Ts[key]; ok {
diff --git a/pkg/sdl/sdl_test.go b/pkg/sdl/sdl_test.go
index ff3bf50..5a675e0 100644
--- a/pkg/sdl/sdl_test.go
+++ b/pkg/sdl/sdl_test.go
@@ -97,9 +97,9 @@
func TestWriteNewE2TInstance(t *testing.T) {
var err error
var file = File{}
- file.WriteNewE2TInstance("", &stub.ValidE2TInstance)
+ file.WriteNewE2TInstance("", &stub.ValidE2TInstance,"")
t.Log(err)
- file.WriteNewE2TInstance("ut.rt", &stub.ValidE2TInstance)
+ file.WriteNewE2TInstance("ut.rt", &stub.ValidE2TInstance,"meid_arr")
t.Log(err)
}
@@ -112,7 +112,7 @@
// File is not provided as argument
file.WriteAssRANToE2TInstance("",stub.Rane2tmap)
t.Log(err)
- file.WriteNewE2TInstance("ut.rt", &stub.ValidE2TInstance)
+ file.WriteNewE2TInstance("ut.rt", &stub.ValidE2TInstance,"")
file.WriteAssRANToE2TInstance("ut.rt",stub.Rane2tmap)
t.Log(err)
}
@@ -127,11 +127,11 @@
file.WriteDisAssRANFromE2TInstance("",stub.Rane2tmap)
t.Log(err)
//RAN list is empty
- file.WriteNewE2TInstance("ut.rt", &stub.ValidE2TInstance)
+ file.WriteNewE2TInstance("ut.rt", &stub.ValidE2TInstance,"")
file.WriteAssRANToE2TInstance("ut.rt",stub.Rane2tmap)
file.WriteDisAssRANFromE2TInstance("ut.rt",stub.Rane2tmaponlyE2t)
//RAN list is present
- file.WriteNewE2TInstance("ut.rt", &stub.ValidE2TInstance)
+ file.WriteNewE2TInstance("ut.rt", &stub.ValidE2TInstance,"")
file.WriteAssRANToE2TInstance("ut.rt",stub.Rane2tmap)
file.WriteDisAssRANFromE2TInstance("ut.rt",stub.Rane2tmap)
t.Log(err)
@@ -151,17 +151,31 @@
Name: "E2Tinstance1",
Fqdn: "10.10.10.10:100",
Ranlist: []string{"1", "2"},
- },
+ },"meid_del|test",
)
file.WriteNewE2TInstance("ut.rt", &rtmgr.E2TInstance{
Name: "E2Tinstance2",
Fqdn: "11.11.11.11:100",
Ranlist: []string{"3", "4"},
- },
+ },"",
)
file.WriteDeleteE2TInstance("ut.rt",&models.E2tDeleteData{
E2TAddress: swag.String("10.10.10.10:100"),
- RanAssocList: models.RanE2tMap{
+ //RanNamelistTobeDissociated: []string{"1","2"},
+ RanAssocList: models.RanE2tMap{
+ {E2TAddress: swag.String("11.11.11.11:100"),RanNamelist: []string{"5","6"}},
+ {E2TAddress: swag.String("doesntexist"),RanNamelist: []string{}}, },
+ })
+ file.WriteNewE2TInstance("ut.rt", &rtmgr.E2TInstance{
+ Name: "E2Tinstance1",
+ Fqdn: "10.10.10.10:100",
+ Ranlist: []string{"1", "2"},
+ },"meid_del|test",
+ )
+ file.WriteDeleteE2TInstance("ut.rt",&models.E2tDeleteData{
+ E2TAddress: swag.String("10.10.10.10:100"),
+ RanNamelistTobeDissociated: []string{"1","2"},
+ RanAssocList: models.RanE2tMap{
{E2TAddress: swag.String("11.11.11.11:100"),RanNamelist: []string{"5","6"}},
{E2TAddress: swag.String("doesntexist"),RanNamelist: []string{}}, },
})
diff --git a/pkg/sdl/types.go b/pkg/sdl/types.go
index f4a9125..821f8e5 100644
--- a/pkg/sdl/types.go
+++ b/pkg/sdl/types.go
@@ -45,7 +45,7 @@
ReadAll(string) (*rtmgr.RicComponents, error)
WriteAll(string, *rtmgr.RicComponents) error
WriteXApps(string, *[]rtmgr.XApp) error
- WriteNewE2TInstance(string, *rtmgr.E2TInstance) error
+ WriteNewE2TInstance(string, *rtmgr.E2TInstance,string) error
WriteAssRANToE2TInstance(string, models.RanE2tMap) error
WriteDisAssRANFromE2TInstance(string, models.RanE2tMap) error
WriteDeleteE2TInstance(string, *models.E2tDeleteData) error
diff --git a/tst/robot/Multiple_E2T_tests.txt b/tst/robot/Multiple_E2T_tests.txt
new file mode 100644
index 0000000..45fe861
--- /dev/null
+++ b/tst/robot/Multiple_E2T_tests.txt
@@ -0,0 +1,433 @@
+*** Settings ***
+Suite Setup Suite Setup
+Suite Teardown Suite Teardown
+Test Timeout 6 minutes
+Library SSHLibrary
+Library String
+Library Collections
+
+*** Variables ***
+${NEAR_RT_RIC_PLT_VM_USERNAME} root # User name of Near-RT RIC Platform VM
+${NEAR_RT_RIC_PLT_VM_PASSWORD} root # Password of Near-RT RIC Platform VM
+${NEAR_RT_RIC_PLT_VM_IP} 10.53.73.29 # IP Address of the Near-RT RIC Platform VM
+${NEAR_RT_RIC_PLT_HOST_IP} 10.43.8.136
+${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} deployment-ricplt-rtmgr-994cd9b46-x4bf2
+${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} deployment-ricplt-e2mgr-7596586d98-vpxbp
+${NEAR_RT_RIC_PLT_RTMGR_SERVICE_NAME} service-ricplt-rtmgr-http
+${NEAR_RT_RIC_PLT_E2MGR_SERVICE_NAME} service-ricplt-e2mgr-http
+
+*** Test Cases ***
+r3_multiple_e2t_instances_support_scenario1
+ [Documentation] This Test case covers the checks of Multiple E2T instance support feature
+ ...
+ ... Scenario 1 [ Positive Case] :
+ ...
+ ... Step1 : \ Create a standalone E2T instance and verify whether its added in datastore(SDL file)
+ ... Check also routes for 1090 and 1101 are mapped
+ ...
+ ... Step2 : \ Associate R1,R2 and R3 to newly created E2T instance one and verify whether its updated in RanList.
+ ...
+ ... Step3 : \ Disassociate R1 and R3 only from E2T instance and verify R2 exists & R1 and R3 removed from RanList
+ ...
+ ... Step4 : \ Delete E2T instance once and verify the instance and R2 is removed from datastore(SDL file)
+ ... Check also routes are demapped for message types 1090 and 1101
+ [Tags] RICPLT_MultipleE2T
+ ##Scenario1 execution
+ ##1: Create one E2T Instnace
+ Log "1. Create one E2T instance "
+ ##Delete If it exists already
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\"}"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\"}"
+ log ${cmd_output}
+ ##2: Verify the file /db/rt.json file whether E2T instance is updated with proper details.
+ Log "2. Verify the file /db/rt.json file whether E2T instance is updated with proper details."
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json | json_pp
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name" : "E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "ranlist" : []
+ Run Keyword Should Contain ${cmd_output} "fqdn" : "10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output1} mse|1090,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+ Run Keyword Should Contain ${cmd_output1} mse|1101,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|0
+
+ ##3: Associate R1,R2,R3 to E2T1
+ Log "3. Associate R1,R2,R3 to E2T1"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/associate-ran-to-e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "[ { \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelist\\": [ \\"R1\\", \\"R2\\", \\"R3\\" ] }]"
+ log ${cmd_output}
+ ##4: Verify the file /db/rt.json whether RANs are associated succsessfully.
+ Log "4. Verify the file /db/rt.json whether RANs are associated succsessfully. "
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R1","R2","R3"]
+ Run Keyword Should Contain ${cmd_output1} mme_ar|10.105.143.108:38000|R1 R2 R3
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|1
+ ##5: Disassociate R1, R3 from E2T1
+ Log "5. Disassociate R1 and R3 from E2T1"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/dissociate-ran" -H "accept: application/json" -H "Content-Type: application/json" -d "[ { \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelist\\": [ \\"R1\\", \\"R3\\" ] }]"
+ log ${cmd_output}
+ ##6: Verify the file /db/rt.json whether R1 and R3 are removed & R2 exists in Ran List.
+ Log "6: Verify the file /db/rt.json whether R1 and R3 are removed & R2 exists in Ran List."
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R2"]
+ Run Keyword Should Contain ${cmd_output1} mme_del|R1 R3
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|1
+ ##7: Delete E2T Instance
+ Log "7. Delete E2T instance "
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\"}"
+ ##8: Verify the file /db/rt.json file whether E2T instance is removed.
+ Log "8. Verify the file /db/rt.json file whether E2T instance is removed"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json | json_pp
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Not Contain ${cmd_output} "ranlist" : []
+ Run Keyword Should Not Contain ${cmd_output} "fqdn" : "10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output1} mme_del|R2
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|1
+ Run Keyword Should Not Contain ${cmd_output1} mse|1090,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+ Run Keyword Should Not Contain ${cmd_output1} mse|1101,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+
+r3_multiple_e2t_instances_support_scenario2
+ [Documentation] This Test case covers the checks of Multiple E2T instance support feature
+ ...
+ ... Scenario 2 [ Positive Case] :
+ ...
+ ... Step1 : \ Create an E2T instance along with RANList R1,R2 and verify whether its added in datastore(SDL file)
+ ...
+ ... Step2 : \ Associate R3 and R4 to newly created E2T instance one and verify whether its updated in RanList.
+ ...
+ ... Step3 : \ Disassociate all the RAN's from E2T instance and verify the same
+ ...
+ ... Step4 : \ Delete E2T instance once and verify the instance removed from datastore(SDL file)
+ [Tags] RICPLT_MultipleE2T
+ ##Scenario1 execution
+ ##1: Create one E2T Instnace
+ Log "1. Create one E2T instance "
+ ##Delete If it exists already
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\"}"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelist\\": [ \\"R1\\", \\"R2\\" ]}"
+ log ${cmd_output}
+ ##2: Verify the file /db/rt.json file whether E2T instance is updated with proper details.
+ Log "2. Verify the file /db/rt.json file whether E2T instance is updated with proper details."
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R1","R2"]
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output1} mse|1090,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+ Run Keyword Should Contain ${cmd_output1} mse|1101,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+ Run Keyword Should Contain ${cmd_output1} mme_ar|10.105.143.108:38000|R1 R2
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|1
+ ##3.Associate new RAN's R3,R4 to E2T1"
+ Log "3. Associate R3,R4 to E2T1"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/associate-ran-to-e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "[ { \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelist\\": [ \\"R3\\", \\"R4\\" ] }]"
+ log ${cmd_output}
+ ##4: Verify the file /db/rt.json whether RANs are associated succsessfully.
+ Log "4. Verify the file /db/rt.json whether RANs are associated succsessfully. "
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R1","R2","R3","R4"]
+ Run Keyword Should Contain ${cmd_output1} mme_ar|10.105.143.108:38000|R3 R4
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|1
+ ##5: Disassociate all RAN's from E2T1
+ Log "5. Disassociate all RAN's from E2T1"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/dissociate-ran" -H "accept: application/json" -H "Content-Type: application/json" -d "[ { \\"E2TAddress\\": \\"10.105.143.108:38000\\" }]"
+ log ${cmd_output}
+ ##6: Verify the file /db/rt.json whether R1,R2,R3 and R4 are removed.
+ Log "6: Verify the file /db/rt.json whether R1 R2 R3 and R4 are removed in Ran List."
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output} "ranlist":[]
+ Run Keyword Should Contain ${cmd_output1} mme_del|R1 R2 R3 R4
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|1
+ ##7: Delete E2T Instance
+ Log "7. Delete E2T instance "
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\"}"
+ ##8: Verify the file /db/rt.json file whether E2T instance is removed.
+ Log "8. Verify the file /db/rt.json file whether E2T instance is removed"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json | json_pp
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Not Contain ${cmd_output} "ranlist" : []
+ Run Keyword Should Not Contain ${cmd_output} "fqdn" : "10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|0
+ Run Keyword Should Not Contain ${cmd_output1} mse|1090,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+ Run Keyword Should Not Contain ${cmd_output1} mse|1101,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+
+r3_multiple_e2t_instances_support_scenario3
+ [Documentation] This Test case covers the checks of Multiple E2T instance support feature
+ ...
+ ... Scenario 3 [ Positive Case] :
+ ...
+ ... Step1 : \ Create an E2T instance along with RANList R1,R2 and verify whether its added in datastore(SDL file)
+ ...
+ ... Step2 : \ Delete E2T instance by providing the RAN list and verify the instance removed from datastore(SDL file)
+ [Tags] RICPLT_MultipleE2T
+ ##Scenario1 execution
+ ##1: Create one E2T Instnace
+ Log "1. Create one E2T instance "
+ ##Delete If it exists already
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\":\\"10.105.143.108:38000\\"}"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelist\\": [ \\"R1\\", \\"R2\\" ]}"
+ log ${cmd_output}
+ ##2: Verify the file /db/rt.json file whether E2T instance is updated with proper details.
+ Log "2. Verify the file /db/rt.json file whether E2T instance is updated with proper details."
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R1","R2"]
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output1} mse|1090,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+ Run Keyword Should Contain ${cmd_output1} mme_ar|10.105.143.108:38000|R1 R2
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|1
+ ##3: Delete E2T Instance
+ Log "7. Delete E2T instance "
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelistTobeDissociated\\": [ \\"R1\\", \\"R2\\" ]}"
+ ##8: Verify the file /db/rt.json file whether E2T instance is removed.
+ Log "8. Verify the file /db/rt.json file whether E2T instance is removed"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json | json_pp
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Not Contain ${cmd_output} "ranlist" : []
+ Run Keyword Should Not Contain ${cmd_output} "fqdn" : "10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|1
+ Run Keyword Should Contain ${cmd_output1} mme_del|R1 R2
+ Run Keyword Should Not Contain ${cmd_output1} mse|1090,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+ Run Keyword Should Not Contain ${cmd_output1} mse|1101,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38000
+
+
+r3_multiple_e2t_instances_support_scenario4
+ [Documentation] This Test case covers the checks of Multiple E2T instance support feature
+ ...
+ ... Scenario 4 [ Positive Case] :
+ ...
+ ... Step1 : \ Create two E2T instances E2T1 and E2T2 along with RANList R11 and R21 respectively, verify whether its added in datastore(SDL file)
+ ...
+ ... Step2 : \ Associate R12 and R22 to newly created E2T1 and E2T2 instance respectively and verify whether its updated in RanList.
+ ...
+ ... Step3 : \ Disassociate all the RAN's from E2T1 instance and R23 R21 from E2T2 instance and verify the same
+ ...
+ ... Step4 : \ Delete E2T2 instance and associate R22 to E2T1 instance and verify the from datastore(SDL file)
+ [Tags] RICPLT_MultipleE2T
+ ##Scenario1 execution
+ ##1: Create one E2T Instnace
+ Log "1. Create E2T instances "
+ ##Delete If it exists already
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\"}"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38001\\"}"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelist\\": [ \\"R11\\" ]}"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38001\\", \\"ranNamelist\\": [ \\"R21\\" ]}"
+ log ${cmd_output}
+ ##2: Verify the file /db/rt.json file whether E2T instance is updated with proper details.
+ Log "2. Verify the file /db/rt.json file whether E2T instance is updated with proper details."
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=35 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R11"]
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R21"]
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38001"
+#Run Keyword Should Contain ${cmd_output1} mse|1090,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38001,10.105.143.108:38000
+#Run Keyword Should Contain ${cmd_output1} mse|1101,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38001,10.105.143.108:38000
+ Run Keyword Should Contain X Times ${cmd_output1} 10.105.143.108:38000 4
+ Run Keyword Should Contain X Times ${cmd_output1} 10.105.143.108:38001 6
+ Run Keyword Should Contain ${cmd_output1} mme_ar|10.105.143.108:38001|R21
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|1
+ ##3.Associate RAN's R12 to E2T1 and R22 to E2T2"
+ Log "3. Associate R12 to E2T1 and R22 to E2T2"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/associate-ran-to-e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "[ { \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelist\\": [ \\"R12\\" ] }]"
+ log ${cmd_output}
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/associate-ran-to-e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "[ { \\"E2TAddress\\": \\"10.105.143.108:38001\\", \\"ranNamelist\\": [ \\"R22\\" ] }]"
+ log ${cmd_output}
+ ##4: Verify the file /db/rt.json whether RANs are associated succsessfully.
+ Log "4. Verify the file /db/rt.json whether RANs are associated succsessfully. "
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ##5. Associate R13 and R23 in a single curl command to E2T1 and E2T2 respectively
+ Log "5. Associate R13 and R23 in a single curl command to E2T1 and E2T2 respectively"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/associate-ran-to-e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "[ { \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelist\\": [ \\"R13\\"] }, { \\"E2TAddress\\": \\"10.105.143.108:38001\\",\\"ranNamelist\\": [ \\"R23\\"] }]"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=25 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R11","R12","R13"]
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R21","R22","R23"]
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38001"
+ Run Keyword Should Contain ${cmd_output1} mme_ar|10.105.143.108:38000|R13
+ Run Keyword Should Contain ${cmd_output1} mme_ar|10.105.143.108:38001|R23
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|2
+ ##6: Disassociate all RAN's from E2T1 R21 and R23 from E2T2
+ Log "6: Disassociate all RAN's from E2T1 R21 and R23 from E2T2"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/dissociate-ran" -H "accept: application/json" -H "Content-Type: application/json" -d "[ { \\"E2TAddress\\": \\"10.105.143.108:38000\\" } ,{ \\"E2TAddress\\": \\"10.105.143.108:38001\\", \\"ranNamelist\\": [ \\"R21\\", \\"R23\\" ] }]"
+ log ${cmd_output}
+ ##7: Verify the file /db/rt.json whether R1,R2,R3 and R4 are removed.
+ Log "7: Verify the file /db/rt.json whether R1 R2 R3 and R4 are removed in Ran List."
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=20 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output} "name":"E2TERMINST"
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Contain ${cmd_output} "ranlist":[]
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38001"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R22"]
+ Run Keyword Should Contain ${cmd_output1} mme_del|R11 R12 R13
+ Run Keyword Should Contain ${cmd_output1} mme_del|R21 R23
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|2
+ ##8: Delete E2T2 Instance and Associate R22 to E2T1
+ Log "8. Delete E2T2 instance and Associate R22 to E2T1"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38001\\", \\"ranAssocList\\": [ { \\"E2TAddress\\": \\"10.105.143.108:38000\\", \\"ranNamelist\\": [ \\"R22\\" ] } ]}"
+ sleep 1
+ ##9: Verify the file /db/rt.json file whether E2T instance is removed.
+ Log "9. Verify the file /db/rt.json file whether E2T instance is removed"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Not Contain ${cmd_output} "ranlist" : []
+ Run Keyword Should Contain ${cmd_output} "fqdn":"10.105.143.108:38000"
+ Run Keyword Should Not Contain ${cmd_output} "fqdn" : "10.105.143.108:38001"
+ Run Keyword Should Contain ${cmd_output} "ranlist":["R22"]
+ Run Keyword Should Contain ${cmd_output1} mme_del|R22
+ Run Keyword Should Contain ${cmd_output1} mme_ar|10.105.143.108:38000|R22
+ Run Keyword Should Contain ${cmd_output1} meid_map|end|2
+
+
+r3_multiple_e2t_instances_support_scenario5
+ [Documentation] This Test case covers the checks of Multiple E2T instance support feature
+ ...
+ ... Scenario 5 [ Positive Case] :
+ ...
+ ... Step1 : \ Create two E2T instance and verify whether its added in datastore(SDL file)
+ ... Check also routes for 1090 and 1101 are mapped
+ ...
+ ... Step2 : \ Remove one E2T instance and check that message types 1090 and 1101 still present.
+ ...
+ ... Step3 : \ Remove second E2T and verify message types 1090 and 1101 are also removed
+ ...
+ [Tags] RICPLT_MultipleE2T
+ ##Scenario1 execution
+ ##1: Create one E2T Instnace
+ Log "1. Create E2T instances "
+ ##Delete If it exists already
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\"}"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38001\\"}"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\" }"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -X POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38001\\" }"
+ log ${cmd_output}
+ ##2: Verify the file /db/rt.json file whether E2T instance is updated with proper details.
+ Log "2. Verify the file /db/rt.json file whether E2T instance is updated with proper details."
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=35 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain X Times ${cmd_output1} 10.105.143.108:38000 4
+ Run Keyword Should Contain X Times ${cmd_output1} 10.105.143.108:38001 4
+ ##3: Delete E2T1 Instance
+ Log "3. Delete E2T1 instance"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38000\\"}"
+ ##4: Verify the file /db/rt.json file whether E2T instance is removed.
+ Log "3. Verify the file /db/rt.json file whether E2T instance is removed"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Contain ${cmd_output1} mse|1090,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38001
+ Run Keyword Should Contain ${cmd_output1} mse|1101,service-ricplt-e2mgr-rmr.ricplt:3801|-1|10.105.143.108:38001
+ ##4: Delete E2T2 Instance
+ Log "4. Delete E2T2 instance"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} -- curl -X DELETE "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"10.105.143.108:38001\\"}"
+ ##4: Verify the file /db/rt.json file whether E2T instance is removed.
+ Log "4. Verify the file /db/rt.json file whether E2T instance is removed"
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} cat /db/rt.json
+ log ${cmd_output}
+ ${cmd_output1} Execute command kubectl logs -n ricplt ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} --tail=12 | grep meid
+ log ${cmd_output1}
+ Run Keyword Should Not Contain ${cmd_output1} mse|1090
+ Run Keyword Should Not Contain ${cmd_output1} mse|1101
+
+r3_multiple_e2t_instances_support_scenario6
+ [Documentation] This Test case covers the checks of Multiple E2T instance support feature
+ ...
+ ... Scenario 6 [ Positive Case] :
+ ...
+ ... Step1 : \ Create of E2T instance with invalid fqdn fails
+ ...
+ [Tags] RICPLT_MultipleE2T
+ ##Scenario1 execution
+ ##1: Create one E2T Instnace
+ Log "1. Create E2T instances "
+ ##Delete If it exists already
+ ${cmd_output} Execute command kubectl exec -n ricplt ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} \ -- curl -i POST "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/e2t" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \\"E2TAddress\\": \\"dummy.e2t.com:12345\\" }"
+ log ${cmd_output}
+ Run Keyword Should Contain ${cmd_output} 400 Bad Request
+
+*** Keywords ***
+Login_RIC_Platform_VM
+ [Arguments] ${alias_name}=ricplt
+ SSHLibrary.Open Connection ${NEAR_RT_RIC_PLT_VM_IP} 22
+ SSHLibrary.Login ${NEAR_RT_RIC_PLT_VM_USERNAME} ${NEAR_RT_RIC_PLT_VM_PASSWORD}
+
+Suite Setup
+ ##Added place holder now
+ Login_RIC_Platform_VM
+ check_ric_platform_services
+
+Suite Teardown
+ Close Connection
+
+Wait For routing manager service
+ [Arguments] ${maxcount}=10 ${count}=1
+ FOR ${count} IN RANGE 1 ${maxcount}
+ ${cmd_output} Execute command kubectl get pod -n ricplt | grep -i deployment-ricplt-rtmgr
+ ${status}= Run Keyword And Ignore Error Should Contain ${cmd_output} Running
+ ${ready}= Run Keyword And Ignore Error Should Contain ${cmd_output} 1/1
+ Log ${status}
+ Log ${ready}
+ Run Keyword If ("${status[0]}" == "PASS") and ("${ready[0]}" == "PASS") Exit For Loop
+ ##Run Keyword And Ignore Error Execute command
+ Sleep 2
+ END
+ Log "Max retry count reached, seems routing manager is not running successfully"
+ Run Keyword Should Contain ${cmd_output} Running
+ Run Keyword Should Contain ${cmd_output} 1/1
+
+check_ric_platform_services
+ ##check whether required servcies are up and running.
+ Log "Checking the status of Routing manager POD"
+ Wait For routing manager service 10 1
+ ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME} Execute command kubectl get pod -n ricplt | grep -i deployment-ricplt-rtmgr | awk '{ print $1}'
+ ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME} Execute command kubectl get pod -n ricplt | grep -i deployment-ricplt-e2mgr | awk '{ print $1}'
+ Set Suite Variable ${NEAR_RT_RIC_PLT_RTMGR_POD_NAME}
+ Set Suite Variable ${NEAR_RT_RIC_PLT_E2MGR_POD_NAME}
+