[RIC-571] Add Automation tests + bug fix in Setup of existing eNB flow 73/4473/1
authorAmichai <amichai.sichel@intl.att.com>
Wed, 29 Jul 2020 09:38:24 +0000 (09:38 +0000)
committerAmichai <amichai.sichel@intl.att.com>
Wed, 29 Jul 2020 09:38:37 +0000 (09:38 +0000)
Change-Id: I7d9e3946c22a8c3174d5cfd571394241deb66d5f
Signed-off-by: Amichai <amichai.sichel@intl.att.com>
18 files changed:
Automation/Tests/A_Init/Init.robot
Automation/Tests/Add_ENB/Add_ENB_Happy.robot
Automation/Tests/E2_Setup_Failure/RM_Error_Setup_Failure.robot
Automation/Tests/GetNodeB-GNB/GetNodeB-GNB_test.robot
Automation/Tests/KeepAlive/keep_alive_test.robot
Automation/Tests/Lost_Connection/LostConnectionTestConnectedRan.robot
Automation/Tests/RedButton/red_button_keywords.robot
Automation/Tests/Resource/Keywords.robot
Automation/Tests/Resource/resource.robot
Automation/Tests/Scripts/k8s_helper.py
Automation/Tests/Scripts/variables.py
Automation/Tests/Setup_Failure/Setup_failure.robot
Automation/Tests/Setup_eNB/Setup_after_Add_eNB.robot [new file with mode: 0644]
Automation/Tests/Setup_eNB/Setup_eNB.robot [new file with mode: 0644]
Automation/Tests/Setup_eNB/__init__.robot [new file with mode: 0644]
E2Manager/container-tag.yaml
E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler.go
E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler_test.go

index 5dd449c..aff7a54 100644 (file)
@@ -40,9 +40,10 @@ Init Environment And Validate
     Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers    4
 
     Start E2
     Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers    4
 
     Start E2
-    Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers
-
+    Wait until keyword succeeds  2 min    10 sec    Validate Required Dockers    5
 
 
+    Start e2adapter
+    Wait until keyword succeeds  1 min    10 sec    Validate Required Dockers
 
 
 
 
 
 
index 171e4d7..0693d6c 100644 (file)
@@ -45,7 +45,8 @@ Add eNB
     String   response body ranName    ${enb_ran_name}
     String   response body connectionStatus    DISCONNECTED
     String   response body nodeType     ENB
     String   response body ranName    ${enb_ran_name}
     String   response body connectionStatus    DISCONNECTED
     String   response body nodeType     ENB
-    String   response body enb enbType    MACRO_ENB
+    String   response body enb enbType    SHORT_MACRO_ENB
+    Missing  response body setupFromNetwork
 
 prepare logs for tests
     Remove log files
 
 prepare logs for tests
     Remove log files
index 31f10c7..2b6af11 100644 (file)
@@ -46,7 +46,7 @@ prepare logs for tests
 
 Get request gnb
     Sleep    2s
 
 Get request gnb
     Sleep    2s
-    Get Request node b gnb
+    Get Request nodeb
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    DISCONNECTED
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    DISCONNECTED
index 68f9541..e4367e9 100644 (file)
@@ -47,7 +47,7 @@ Redis Monitor Logs - Verify Publish
 
 Get request gnb
     Sleep    2s
 
 Get request gnb
     Sleep    2s
-    Get Request node b gnb
+    Get Request nodeb
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    CONNECTED
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    CONNECTED
@@ -59,7 +59,7 @@ Get request gnb
     Integer  response body gnb ranFunctions 1 ranFunctionRevision  1
     Integer  response body gnb ranFunctions 2 ranFunctionId  3
     Integer  response body gnb ranFunctions 2 ranFunctionRevision  1
     Integer  response body gnb ranFunctions 1 ranFunctionRevision  1
     Integer  response body gnb ranFunctions 2 ranFunctionId  3
     Integer  response body gnb ranFunctions 2 ranFunctionRevision  1
-
+    Boolean  response body setupFromNetwork    true
 
 Prepare Logs For Tests
     Remove log files
 
 Prepare Logs For Tests
     Remove log files
index 353664b..e7c7ae8 100644 (file)
@@ -34,7 +34,7 @@ ${url}  ${e2mgr_address}
 
 Get request gnb
     Sleep    2s
 
 Get request gnb
     Sleep    2s
-    Get Request node b gnb
+    Get Request nodeb
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    CONNECTED
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    CONNECTED
@@ -65,7 +65,7 @@ Prepare logs
 
 Verify RAN is not associated with E2T instance
     Sleep  6m
 
 Verify RAN is not associated with E2T instance
     Sleep  6m
-    Get Request node b gnb
+    Get Request nodeb
     Integer  response status  200
     String   response body ranName    ${ranname}
     Missing  response body associatedE2tInstanceAddress
     Integer  response status  200
     String   response body ranName    ${ranname}
     Missing  response body associatedE2tInstanceAddress
index 5f3f59f..9957c5b 100644 (file)
@@ -40,7 +40,7 @@ Prepare Redis Monitor Log
     Start Redis Monitor
 
 Setup Ran and verify it's CONNECTED and associated
     Start Redis Monitor
 
 Setup Ran and verify it's CONNECTED and associated
-    Get Request node b gnb
+    Get Request nodeb
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    CONNECTED
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    CONNECTED
@@ -51,7 +51,7 @@ Stop simulator
 
 Verify connection status is DISCONNECTED and RAN is not associated with E2T instance
     Sleep    30s
 
 Verify connection status is DISCONNECTED and RAN is not associated with E2T instance
     Sleep    30s
-    GET      ${getNodeb}
+    GET      ${getNodeb}/${ranName}
     Integer  response status  200
     String   response body ranName    ${ranname}
     Missing  response body associatedE2tInstanceAddress
     Integer  response status  200
     String   response body ranName    ${ranname}
     Missing  response body associatedE2tInstanceAddress
index 23d0875..c808cf8 100644 (file)
@@ -32,14 +32,14 @@ ${url}  ${e2mgr_address}
 
 *** Keywords ***
 Verify connected and associated
 
 *** Keywords ***
 Verify connected and associated
-   Get Request node b gnb
+   Get Request nodeb
    Integer  response status  200
    String   response body ranName   ${ranName}
    String   response body connectionStatus    CONNECTED
    String   response body associatedE2tInstanceAddress  ${e2t_alpha_address}
 
 Verify shutdown for gnb
    Integer  response status  200
    String   response body ranName   ${ranName}
    String   response body connectionStatus    CONNECTED
    String   response body associatedE2tInstanceAddress  ${e2t_alpha_address}
 
 Verify shutdown for gnb
-    Get Request node b gnb
+    Get Request nodeb
     Integer  response status  200
     String   response body ranName    ${ranName}
     String   response body connectionStatus    SHUT_DOWN
     Integer  response status  200
     String   response body ranName    ${ranName}
     String   response body connectionStatus    SHUT_DOWN
index 7135888..6d1fdd8 100644 (file)
@@ -27,11 +27,16 @@ Library     ../Scripts/k8s_helper.py
 Resource   ../Resource/resource.robot
 Library     OperatingSystem
 Library     Process
 Resource   ../Resource/resource.robot
 Library     OperatingSystem
 Library     Process
+Variables  ../Scripts/variables.py
+
+*** Variables ***
+${e2adapter}  ${e2adapter_pod_name}
 
 *** Keywords ***
 
 *** Keywords ***
-Get Request node b gnb
+Get Request nodeb
+    [Arguments]    ${nodeb_name}=${ranName}
     Sleep    1s
     Sleep    1s
-    GET      ${getNodeb}
+    GET      ${getNodeb}/${nodeb_name}
 
 Update Gnb request
     Sleep  1s
 
 Update Gnb request
     Sleep  1s
@@ -62,7 +67,6 @@ Remove log files
     Remove File  ${EXECDIR}/${e2mgr_log_filename}
     Remove File  ${EXECDIR}/${e2t_log_filename}
 
     Remove File  ${EXECDIR}/${e2mgr_log_filename}
     Remove File  ${EXECDIR}/${e2t_log_filename}
 
-
 Save logs
     Sleep   1s
     Run     ${Save_sim_log}
 Save logs
     Sleep   1s
     Run     ${Save_sim_log}
@@ -162,6 +166,16 @@ Restart Routing Manager
     Stop Routing Manager
     Start Routing Manager
 
     Stop Routing Manager
     Start Routing Manager
 
+Start e2adapter
+     Log to Console  Starting e2adapter
+     Run And Return Rc And Output    ${start_e2adapter}
+     Sleep  5s
+
+Stop e2adapter
+     Log to Console  Stopping e2adapter
+     Run And Return Rc And Output    ${stop_e2adapter}
+     Sleep  5s
+
 Flush And Populate DB
     [Arguments]    ${set_new_timestamp}=${True}
     Log To Console  Flushing and populating DB
 Flush And Populate DB
     [Arguments]    ${set_new_timestamp}=${True}
     Log To Console  Flushing and populating DB
@@ -174,6 +188,13 @@ Stop All Pods Except Simulator
     Stop Dbass
     Stop E2
     Stop Routing Manager
     Stop Dbass
     Stop E2
     Stop Routing Manager
+    Stop e2adapter
+
+Send eNB Setup Request
+    Log To Console  Sending eNB setup request form e2adapter
+    ${send_enb_setup}       Evaluate    "kubectl -n ricplt exec -it ${e2adapter} cli send-e2setup-req 10.0.2.15"
+    Sleep    3s
+    Run And Return Rc And Output    ${send_enb_setup}
 
 Start Redis Monitor
     Log To Console  Starting redis monitor log
 
 Start Redis Monitor
     Log To Console  Starting redis monitor log
@@ -190,11 +211,20 @@ Stop Redis Monitor
 Redis Monitor Logs - Verify Publish To Manipulation Channel
     [Arguments]       ${ran_name}    ${event}
     Log To Console  Verify Publish To Manipulation Channel
 Redis Monitor Logs - Verify Publish To Manipulation Channel
     [Arguments]       ${ran_name}    ${event}
     Log To Console  Verify Publish To Manipulation Channel
+    Sleep    3s
     ${result}=  log_scripts.verify_redis_monitor_manipulation_message   ${EXECDIR}/${redis_monitor_log_filename}  ${ran_name}    ${event}
     Should Be Equal As Strings    ${result}      True
 
 Redis Monitor Logs - Verify Publish To Connection Status Channel
     [Arguments]       ${ran_name}    ${event}
     Log To Console    Verify Publish To Connection Status Channel
     ${result}=  log_scripts.verify_redis_monitor_manipulation_message   ${EXECDIR}/${redis_monitor_log_filename}  ${ran_name}    ${event}
     Should Be Equal As Strings    ${result}      True
 
 Redis Monitor Logs - Verify Publish To Connection Status Channel
     [Arguments]       ${ran_name}    ${event}
     Log To Console    Verify Publish To Connection Status Channel
+    Sleep    3s
     ${result}=  log_scripts.verify_redis_monitor_connection_status_message   ${EXECDIR}/${redis_monitor_log_filename}  ${ran_name}    ${event}
     Should Be Equal As Strings    ${result}      True
     ${result}=  log_scripts.verify_redis_monitor_connection_status_message   ${EXECDIR}/${redis_monitor_log_filename}  ${ran_name}    ${event}
     Should Be Equal As Strings    ${result}      True
+
+Redis Monitor Logs - Verify NOT Published To Manipulation Channel
+    [Arguments]       ${ran_name}    ${event}
+    Log To Console  Verify NOT Published To Manipulation Channel
+    Sleep    3s
+    ${result}=  log_scripts.verify_redis_monitor_manipulation_message   ${EXECDIR}/${redis_monitor_log_filename}  ${ran_name}    ${event}
+    Should Be Equal As Strings    ${result}      False
\ No newline at end of file
index 86913ba..dff5926 100644 (file)
@@ -28,23 +28,23 @@ Documentation    Resource file
 
 #REST
 ${ranName}  gnb_208_092_303030
 
 #REST
 ${ranName}  gnb_208_092_303030
-${enb_ran_name}    enb_test
-${getNodeb}  /v1/nodeb/${ranName}
+${enb_ran_name}    enB_shortmacro_208__555540
+${getNodeb}  /v1/nodeb
 ${set_general_configuration}   /v1/nodeb/parameters
 ${set_general_configuration_body}   {"enableRic":false}
 ${update_gnb_url}   /v1/nodeb/gnb/${ranName}
 ${enb_url}    /v1/nodeb/enb
 ${update_gnb_body}  {"servedNrCells":[{"servedNrCellInformation":{"cellId":"abcd","choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1,"servedPlmns":["whatever"]},"nrNeighbourInfos":[{"nrCgi":"one","choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1}]}]}
 ${update_gnb_body_notvalid}  {"servedNrCells":[{"servedNrCellInformation":{"choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1,"servedPlmns":["whatever"]},"nrNeighbourInfos":[{"nrCgi":"whatever","choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1}]}]}
 ${set_general_configuration}   /v1/nodeb/parameters
 ${set_general_configuration_body}   {"enableRic":false}
 ${update_gnb_url}   /v1/nodeb/gnb/${ranName}
 ${enb_url}    /v1/nodeb/enb
 ${update_gnb_body}  {"servedNrCells":[{"servedNrCellInformation":{"cellId":"abcd","choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1,"servedPlmns":["whatever"]},"nrNeighbourInfos":[{"nrCgi":"one","choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1}]}]}
 ${update_gnb_body_notvalid}  {"servedNrCells":[{"servedNrCellInformation":{"choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1,"servedPlmns":["whatever"]},"nrNeighbourInfos":[{"nrCgi":"whatever","choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1}]}]}
-${add_enb_request_body}    {"ranName":"enb_test","globalNbId":{"nbId":"abc","plmnId":"def"},"port":1234,"enb":{"enbType":1,"guGroupIds":["ghi"],"servedCells":[{"broadcastPlmns":["jkl"],"cellId":"mnop","choiceEutraMode":{"fdd":{"dlearFcn":1,"ulearFcn":1},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":3,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":4,"ecgi":"klj","pci":5,"tac":"wew"}],"pci":2,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":5,"prachFrequencyOffset":6,"rootSequenceIndex":7,"zeroCorrelationZoneConfiguration":6},"tac":"asd","additionalCellInformation":{"cellLatitude":1,"cellLongitude":1,"antennaHeight":1,"antennaAzimuthDirection":2,"antennaTiltAngle":3,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":6}},{"broadcastPlmns":["jkl"],"cellId":"qrst","choiceEutraMode":{"fdd":{"dlearFcn":4,"ulearFcn":2},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":5,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":2,"ecgi":"klj","pci":4,"tac":"wew"}],"pci":3,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":4,"prachFrequencyOffset":3,"rootSequenceIndex":3,"zeroCorrelationZoneConfiguration":2},"tac":"asd","additionalCellInformation":{"cellLatitude":3,"cellLongitude":3,"antennaHeight":3,"antennaAzimuthDirection":3,"antennaTiltAngle":4,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":5}}]}}
-${add_enb_response_body}    {"ranName":"enb_test","port":1234,"connectionStatus":"DISCONNECTED","globalNbId":{"plmnId":"def","nbId":"abc"},"nodeType":"ENB","enb":{"enbType":"MACRO_ENB","servedCells":[{"pci":2,"cellId":"mnop","tac":"asd","broadcastPlmns":["jkl"],"choiceEutraMode":{"fdd":{"ulearFcn":1,"dlearFcn":1},"tdd":{"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":"SSP0","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":"SSP0","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"},"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":"SSP10","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"}}},"eutraMode":"FDD","prachConfiguration":{"rootSequenceIndex":7,"zeroCorrelationZoneConfiguration":6,"highSpeedFlag":true,"prachFrequencyOffset":6,"prachConfigurationIndex":5},"mbsfnSubframeInfos":[{"radioframeAllocationOffset":3,"subframeAllocation":"jhg"}],"csgId":"string","mbmsServiceAreaIdentities":["sds"],"multibandInfos":[4],"neighbourInfos":[{"ecgi":"klj","pci":5,"earFcn":4,"tac":"wew"}],"additionalCellInformation":{"cellLatitude":1,"cellLongitude":1,"antennaHeight":1,"antennaAzimuthDirection":2,"antennaTiltAngle":3,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":6}},{"pci":3,"cellId":"qrst","tac":"asd","broadcastPlmns":["jkl"],"choiceEutraMode":{"fdd":{"ulearFcn":2,"dlearFcn":4},"tdd":{"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":"SSP0","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":"SSP0","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"},"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":"SSP10","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"}}},"eutraMode":"FDD","prachConfiguration":{"rootSequenceIndex":3,"zeroCorrelationZoneConfiguration":2,"highSpeedFlag":true,"prachFrequencyOffset":3,"prachConfigurationIndex":4},"mbsfnSubframeInfos":[{"radioframeAllocationOffset":5,"subframeAllocation":"jhg"}],"csgId":"string","mbmsServiceAreaIdentities":["sds"],"multibandInfos":[4],"neighbourInfos":[{"ecgi":"klj","pci":4,"earFcn":2,"tac":"wew"}],"additionalCellInformation":{"cellLatitude":3,"cellLongitude":3,"antennaHeight":3,"antennaAzimuthDirection":3,"antennaTiltAngle":4,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":5}}],"guGroupIds":["ghi"]}}
+${add_enb_request_body}    {"ranName":"${enb_ran_name}","globalNbId":{"nbId":"abc","plmnId":"def"},"port":1234,"enb":{"enbType":3,"guGroupIds":["ghi"],"servedCells":[{"broadcastPlmns":["jkl"],"cellId":"mnop","choiceEutraMode":{"fdd":{"dlearFcn":1,"ulearFcn":1},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":3,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":4,"ecgi":"klj","pci":5,"tac":"wew"}],"pci":2,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":5,"prachFrequencyOffset":6,"rootSequenceIndex":7,"zeroCorrelationZoneConfiguration":6},"tac":"asd","additionalCellInformation":{"cellLatitude":1,"cellLongitude":1,"antennaHeight":1,"antennaAzimuthDirection":2,"antennaTiltAngle":3,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":6}},{"broadcastPlmns":["jkl"],"cellId":"qrst","choiceEutraMode":{"fdd":{"dlearFcn":4,"ulearFcn":2},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":5,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":2,"ecgi":"klj","pci":4,"tac":"wew"}],"pci":3,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":4,"prachFrequencyOffset":3,"rootSequenceIndex":3,"zeroCorrelationZoneConfiguration":2},"tac":"asd","additionalCellInformation":{"cellLatitude":3,"cellLongitude":3,"antennaHeight":3,"antennaAzimuthDirection":3,"antennaTiltAngle":4,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":5}}]}}
+${add_enb_response_body}    {"ranName":"${enb_ran_name}","port":1234,"connectionStatus":"DISCONNECTED","globalNbId":{"plmnId":"def","nbId":"abc"},"nodeType":"ENB","enb":{"enbType":"SHORT_MACRO_ENB","servedCells":[{"pci":2,"cellId":"mnop","tac":"asd","broadcastPlmns":["jkl"],"choiceEutraMode":{"fdd":{"ulearFcn":1,"dlearFcn":1},"tdd":{"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":"SSP0","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":"SSP0","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"},"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":"SSP10","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"}}},"eutraMode":"FDD","prachConfiguration":{"rootSequenceIndex":7,"zeroCorrelationZoneConfiguration":6,"highSpeedFlag":true,"prachFrequencyOffset":6,"prachConfigurationIndex":5},"mbsfnSubframeInfos":[{"radioframeAllocationOffset":3,"subframeAllocation":"jhg"}],"csgId":"string","mbmsServiceAreaIdentities":["sds"],"multibandInfos":[4],"neighbourInfos":[{"ecgi":"klj","pci":5,"earFcn":4,"tac":"wew"}],"additionalCellInformation":{"cellLatitude":1,"cellLongitude":1,"antennaHeight":1,"antennaAzimuthDirection":2,"antennaTiltAngle":3,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":6}},{"pci":3,"cellId":"qrst","tac":"asd","broadcastPlmns":["jkl"],"choiceEutraMode":{"fdd":{"ulearFcn":2,"dlearFcn":4},"tdd":{"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":"SSP0","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":"SSP0","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"},"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":"SSP10","cyclicPrefixDl":"NORMAL","cyclicPrefixUl":"NORMAL"}}},"eutraMode":"FDD","prachConfiguration":{"rootSequenceIndex":3,"zeroCorrelationZoneConfiguration":2,"highSpeedFlag":true,"prachFrequencyOffset":3,"prachConfigurationIndex":4},"mbsfnSubframeInfos":[{"radioframeAllocationOffset":5,"subframeAllocation":"jhg"}],"csgId":"string","mbmsServiceAreaIdentities":["sds"],"multibandInfos":[4],"neighbourInfos":[{"ecgi":"klj","pci":4,"earFcn":2,"tac":"wew"}],"additionalCellInformation":{"cellLatitude":3,"cellLongitude":3,"antennaHeight":3,"antennaAzimuthDirection":3,"antennaTiltAngle":4,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":5}}],"guGroupIds":["ghi"]}}
 ${update_enb_request_body}    {"enb":{"enbType":"HOME_ENB","guGroupIds":["ghi"],"servedCells":[{"broadcastPlmns":["jkl"],"cellId":"mnop","choiceEutraMode":{"fdd":{"dlearFcn":1,"ulearFcn":1},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":3,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":4,"ecgi":"klj","pci":5,"tac":"wew"}],"pci":2,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":5,"prachFrequencyOffset":6,"rootSequenceIndex":7,"zeroCorrelationZoneConfiguration":6},"tac":"asd","additionalCellInformation":{"cellLatitude":1,"cellLongitude":1,"antennaHeight":1,"antennaAzimuthDirection":2,"antennaTiltAngle":3,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":6}},{"broadcastPlmns":["jkl"],"cellId":"qrst","choiceEutraMode":{"fdd":{"dlearFcn":4,"ulearFcn":2},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":5,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":2,"ecgi":"klj","pci":4,"tac":"wew"}],"pci":3,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":4,"prachFrequencyOffset":3,"rootSequenceIndex":3,"zeroCorrelationZoneConfiguration":2},"tac":"asd","additionalCellInformation":{"cellLatitude":3,"cellLongitude":3,"antennaHeight":3,"antennaAzimuthDirection":3,"antennaTiltAngle":4,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":5}}]}}
 ${header}  {"Content-Type": "application/json"}
 
 #K8S
 ${update_enb_request_body}    {"enb":{"enbType":"HOME_ENB","guGroupIds":["ghi"],"servedCells":[{"broadcastPlmns":["jkl"],"cellId":"mnop","choiceEutraMode":{"fdd":{"dlearFcn":1,"ulearFcn":1},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":3,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":4,"ecgi":"klj","pci":5,"tac":"wew"}],"pci":2,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":5,"prachFrequencyOffset":6,"rootSequenceIndex":7,"zeroCorrelationZoneConfiguration":6},"tac":"asd","additionalCellInformation":{"cellLatitude":1,"cellLongitude":1,"antennaHeight":1,"antennaAzimuthDirection":2,"antennaTiltAngle":3,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":6}},{"broadcastPlmns":["jkl"],"cellId":"qrst","choiceEutraMode":{"fdd":{"dlearFcn":4,"ulearFcn":2},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":5,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":2,"ecgi":"klj","pci":4,"tac":"wew"}],"pci":3,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":4,"prachFrequencyOffset":3,"rootSequenceIndex":3,"zeroCorrelationZoneConfiguration":2},"tac":"asd","additionalCellInformation":{"cellLatitude":3,"cellLongitude":3,"antennaHeight":3,"antennaAzimuthDirection":3,"antennaTiltAngle":4,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":5}}]}}
 ${header}  {"Content-Type": "application/json"}
 
 #K8S
-${pods_number}    5
-${pods_number-1}    4
-${verify_all_pods_are_ready_command}  kubectl -n ricplt get pods | grep -E 'dbaas|e2mgr|rtmgr|gnbe2|e2term' | grep Running | grep 1/1 |wc --lines
+${pods_number}    6
+${pods_number-1}    5
+${verify_all_pods_are_ready_command}  kubectl -n ricplt get pods | grep -E 'dbaas|e2mgr|rtmgr|gnbe2|e2term|e2adapter' | grep Running | grep 1/1 |wc --lines
 ${stop_simu}  kubectl scale --replicas=0 deploy/oran-simulator-gnbe2-oran-simu -n=ricplt
 ${start_simu}  kubectl scale --replicas=1 deploy/oran-simulator-gnbe2-oran-simu -n=ricplt
 ${start_e2mgr}  kubectl scale --replicas=1 deploy/deployment-ricplt-e2mgr -n=ricplt
 ${stop_simu}  kubectl scale --replicas=0 deploy/oran-simulator-gnbe2-oran-simu -n=ricplt
 ${start_simu}  kubectl scale --replicas=1 deploy/oran-simulator-gnbe2-oran-simu -n=ricplt
 ${start_e2mgr}  kubectl scale --replicas=1 deploy/deployment-ricplt-e2mgr -n=ricplt
@@ -55,6 +55,8 @@ ${dbass_start}   kubectl -n ricplt scale statefulsets statefulset-ricplt-dbaas-s
 ${dbass_stop}      kubectl -n ricplt scale statefulsets statefulset-ricplt-dbaas-server --replicas=0
 ${stop_routing_manager}  kubectl scale --replicas=0 deploy/deployment-ricplt-rtmgr -n=ricplt
 ${start_routing_manager}  kubectl scale --replicas=1 deploy/deployment-ricplt-rtmgr -n=ricplt
 ${dbass_stop}      kubectl -n ricplt scale statefulsets statefulset-ricplt-dbaas-server --replicas=0
 ${stop_routing_manager}  kubectl scale --replicas=0 deploy/deployment-ricplt-rtmgr -n=ricplt
 ${start_routing_manager}  kubectl scale --replicas=1 deploy/deployment-ricplt-rtmgr -n=ricplt
+${stop_e2adapter}  kubectl scale --replicas=0 deploy/e2adapter -n=ricplt
+${start_e2adapter}  kubectl scale --replicas=1 deploy/e2adapter -n=ricplt
 ${gnbe2_sim_pod}  kubectl -n ricplt get pods |grep gnbe2 | awk '{print $1}'
 ${e2mgr_pod}  kubectl -n ricplt get pods |grep e2mgr | awk '{print $1}'
 ${e2term_pod}  kubectl -n ricplt get pods |grep e2term | awk '{print $1}'
 ${gnbe2_sim_pod}  kubectl -n ricplt get pods |grep gnbe2 | awk '{print $1}'
 ${e2mgr_pod}  kubectl -n ricplt get pods |grep e2mgr | awk '{print $1}'
 ${e2term_pod}  kubectl -n ricplt get pods |grep e2term | awk '{print $1}'
index 2a84943..4fe6dd8 100644 (file)
@@ -29,4 +29,12 @@ def extract_service_ip(service_name):
 
     service_ip = subprocess.check_output(["/bin/bash", "-c", k8s_command], universal_newlines=True)
 
 
     service_ip = subprocess.check_output(["/bin/bash", "-c", k8s_command], universal_newlines=True)
 
-    return service_ip.strip()
\ No newline at end of file
+    return service_ip.strip()
+
+def extract_pod_name(pod_base_name):
+    k8s_command = "kubectl get pods -n ricplt | /bin/grep {} | awk \'{{print $1}}\'" \
+        .format(pod_base_name)
+
+    pod_name = subprocess.check_output(["/bin/bash", "-c", k8s_command], universal_newlines=True)
+
+    return pod_name.strip()
\ No newline at end of file
index 14c3747..d23e1f3 100644 (file)
@@ -26,3 +26,6 @@ e2mgr_address = "http://" + e2mgr_ip + ":3800"
 
 e2t_alpha_ip = k8s_helper.extract_service_ip("e2term-rmr-alpha")
 e2t_alpha_address = e2t_alpha_ip + ":38000"
 
 e2t_alpha_ip = k8s_helper.extract_service_ip("e2term-rmr-alpha")
 e2t_alpha_address = e2t_alpha_ip + ":38000"
+
+e2adapter_pod_name = k8s_helper.extract_pod_name("e2adapter")
+
index 4aa0ef4..9a6c994 100644 (file)
@@ -46,7 +46,7 @@ prepare logs for tests
 
 Get request gnb
     Sleep    2s
 
 Get request gnb
     Sleep    2s
-    Get Request node b gnb
+    Get Request nodeb
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    DISCONNECTED
     Integer  response status  200
     String   response body ranName    ${ranname}
     String   response body connectionStatus    DISCONNECTED
diff --git a/Automation/Tests/Setup_eNB/Setup_after_Add_eNB.robot b/Automation/Tests/Setup_eNB/Setup_after_Add_eNB.robot
new file mode 100644 (file)
index 0000000..93fdfbe
--- /dev/null
@@ -0,0 +1,78 @@
+##############################################################################
+#
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   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).
+#
+
+
+*** Settings ***
+Variables  ../Scripts/variables.py
+Resource   ../Resource/resource.robot
+Resource   ../Resource/Keywords.robot
+Library     OperatingSystem
+Library     ../Scripts/find_rmr_message.py
+Library     ../Scripts/log_scripts.py
+Library     REST        ${url}
+
+*** Variables ***
+${url}  ${e2mgr_address}
+
+*** Test Cases ***
+[Setup]
+    Start Redis Monitor
+    AND Prepare Enviorment
+
+Add eNB
+    Sleep  2s
+    Add eNb Request
+    Integer  response status  201
+    String   response body ranName    ${enb_ran_name}
+    String   response body connectionStatus    DISCONNECTED
+    String   response body nodeType     ENB
+    String   response body enb enbType    SHORT_MACRO_ENB
+    Missing  response body setupFromNetwork
+
+Send eNB setup request via e2adapter
+    Send eNB Setup Request
+
+Get request eNB
+    Sleep    2s
+    Get Request nodeb    ${enb_ran_name}
+    Integer  response status  200
+    String   response body ranName    ${enb_ran_name}
+    String   response body connectionStatus    CONNECTED
+    String   response body nodeType     ENB
+    String   response body enb enbType    SHORT_MACRO_ENB
+    Boolean  response body setupFromNetwork    true
+
+Prepare Logs For Tests
+    Remove log files
+    Save logs
+
+Redis Monitor Logs - Verify Publish
+    Redis Monitor Logs - Verify Publish To Connection Status Channel    ${enb_ran_name}    CONNECTED
+    Redis Monitor Logs - Verify NOT Published To Manipulation Channel    ${enb_ran_name}    UPDATED
+
+[Teardown]
+    Stop Redis Monitor
+
+
+
+
+
diff --git a/Automation/Tests/Setup_eNB/Setup_eNB.robot b/Automation/Tests/Setup_eNB/Setup_eNB.robot
new file mode 100644 (file)
index 0000000..411b7df
--- /dev/null
@@ -0,0 +1,68 @@
+##############################################################################
+#
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   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).
+#
+
+
+*** Settings ***
+Variables  ../Scripts/variables.py
+Resource   ../Resource/resource.robot
+Resource   ../Resource/Keywords.robot
+Library     OperatingSystem
+Library     ../Scripts/find_rmr_message.py
+Library     ../Scripts/log_scripts.py
+Library     REST        ${url}
+
+*** Variables ***
+${url}  ${e2mgr_address}
+
+*** Test Cases ***
+[Setup]
+    Start Redis Monitor
+    AND Prepare Enviorment
+
+Send eNB setup request via e2adapter
+    Send eNB Setup Request
+
+Redis Monitor Logs - Verify Publish
+    Redis Monitor Logs - Verify Publish To Connection Status Channel    ${enb_ran_name}    CONNECTED
+    Redis Monitor Logs - Verify NOT Published To Manipulation Channel    ${enb_ran_name}    UPDATED
+
+Get request eNB
+    Sleep    2s
+    Get Request nodeb    ${enb_ran_name}
+    Integer  response status  200
+    String   response body ranName    ${enb_ran_name}
+    String   response body connectionStatus    CONNECTED
+    String   response body nodeType     ENB
+    String   response body enb enbType    SHORT_MACRO_ENB
+    Boolean  response body setupFromNetwork    true
+
+Prepare Logs For Tests
+    Remove log files
+    Save logs
+
+[Teardown]
+    Stop Redis Monitor
+
+
+
+
+
diff --git a/Automation/Tests/Setup_eNB/__init__.robot b/Automation/Tests/Setup_eNB/__init__.robot
new file mode 100644 (file)
index 0000000..abba85a
--- /dev/null
@@ -0,0 +1,24 @@
+##############################################################################
+#
+#   Copyright (c) 2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   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).
+#
+
+*** Settings ***
+Documentation    Setup eNB
index f3836f5..9c2a4cb 100644 (file)
@@ -1,4 +1,4 @@
 # The Jenkins job requires a tag to build the Docker image.
 # Global-JJB script assumes this file is in the repo root.
 ---
 # The Jenkins job requires a tag to build the Docker image.
 # Global-JJB script assumes this file is in the repo root.
 ---
-tag: 5.4.1
+tag: 5.4.2
index 259dcc3..a6888d9 100644 (file)
@@ -216,6 +216,8 @@ func (h *E2SetupRequestNotificationHandler) handleExistingRan(ranName string, no
                return false, errors.New("nodeB entity in incorrect state")
        }
 
                return false, errors.New("nodeB entity in incorrect state")
        }
 
+       nodebInfo.SetupFromNetwork = true
+
        if nodebInfo.NodeType == entities.Node_ENB {
                return false, nil
        }
        if nodebInfo.NodeType == entities.Node_ENB {
                return false, nil
        }
index 03f2a70..d6de214 100644 (file)
@@ -546,7 +546,7 @@ func TestE2SetupRequestNotificationHandler_HandleExistingConnectedEnbSuccess(t *
 
        notificationRequest := &models.NotificationRequest{RanName: enbNodebRanName, Payload: append([]byte(e2SetupMsgPrefix), xmlEnb...)}
        enbToUpdate := getExpectedNodebForExistingRan(*nodebInfo, notificationRequest.Payload)
 
        notificationRequest := &models.NotificationRequest{RanName: enbNodebRanName, Payload: append([]byte(e2SetupMsgPrefix), xmlEnb...)}
        enbToUpdate := getExpectedNodebForExistingRan(*nodebInfo, notificationRequest.Payload)
-
+       enbToUpdate.SetupFromNetwork = true
        writerMock.On("UpdateNodebInfo", enbToUpdate).Return(nil)
        e2tInstancesManagerMock.On("AddRansToInstance", e2tInstanceFullAddress, []string{enbNodebRanName}).Return(nil)
        var errEmpty error
        writerMock.On("UpdateNodebInfo", enbToUpdate).Return(nil)
        e2tInstancesManagerMock.On("AddRansToInstance", e2tInstanceFullAddress, []string{enbNodebRanName}).Return(nil)
        var errEmpty error
@@ -579,9 +579,11 @@ func TestE2SetupRequestNotificationHandler_HandleExistingDisconnectedEnbSuccess(
 
        enbToUpdate2 := *enbToUpdate
        enbToUpdate2.ConnectionStatus = entities.ConnectionStatus_CONNECTED
 
        enbToUpdate2 := *enbToUpdate
        enbToUpdate2.ConnectionStatus = entities.ConnectionStatus_CONNECTED
+       enbToUpdate2.SetupFromNetwork = true
        writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &enbToUpdate2, enbNodebRanName+"_CONNECTED").Return(nil)
        enbToUpdate3 := *enbToUpdate
        enbToUpdate3.ConnectionStatus = entities.ConnectionStatus_CONNECTED
        writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &enbToUpdate2, enbNodebRanName+"_CONNECTED").Return(nil)
        enbToUpdate3 := *enbToUpdate
        enbToUpdate3.ConnectionStatus = entities.ConnectionStatus_CONNECTED
+       enbToUpdate3.SetupFromNetwork = true
        enbToUpdate3.AssociatedE2TInstanceAddress = e2tInstanceFullAddress
        writerMock.On("UpdateNodebInfo", &enbToUpdate3).Return(nil)
        e2tInstancesManagerMock.On("AddRansToInstance", e2tInstanceFullAddress, []string{enbNodebRanName}).Return(nil)
        enbToUpdate3.AssociatedE2TInstanceAddress = e2tInstanceFullAddress
        writerMock.On("UpdateNodebInfo", &enbToUpdate3).Return(nil)
        e2tInstancesManagerMock.On("AddRansToInstance", e2tInstanceFullAddress, []string{enbNodebRanName}).Return(nil)
@@ -624,7 +626,7 @@ func testE2SetupRequestNotificationHandler_HandleExistingConnectedGnbSuccess(t *
 
        notificationRequest := &models.NotificationRequest{RanName: gnbNodebRanName, Payload: append([]byte(e2SetupMsgPrefix), xmlGnb...)}
        gnbToUpdate := getExpectedNodebForExistingRan(*nodebInfo, notificationRequest.Payload)
 
        notificationRequest := &models.NotificationRequest{RanName: gnbNodebRanName, Payload: append([]byte(e2SetupMsgPrefix), xmlGnb...)}
        gnbToUpdate := getExpectedNodebForExistingRan(*nodebInfo, notificationRequest.Payload)
-
+       gnbToUpdate.SetupFromNetwork = true
        writerMock.On("UpdateNodebInfo", gnbToUpdate).Return(nil)
        if withFunctions {
                writerMock.On("UpdateNodebInfoAndPublish", gnbToUpdate).Return(nil)
        writerMock.On("UpdateNodebInfo", gnbToUpdate).Return(nil)
        if withFunctions {
                writerMock.On("UpdateNodebInfoAndPublish", gnbToUpdate).Return(nil)
@@ -663,6 +665,7 @@ func TestE2SetupRequestNotificationHandler_HandleExistingConnectedGnbRoutingMana
 
        gnbToUpdate2 := *gnbToUpdate
        gnbToUpdate2.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED
 
        gnbToUpdate2 := *gnbToUpdate
        gnbToUpdate2.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED
+       gnbToUpdate2.SetupFromNetwork = true
        writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &gnbToUpdate2, gnbNodebRanName+"_DISCONNECTED").Return(nil)
 
        var errEmpty error
        writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &gnbToUpdate2, gnbNodebRanName+"_DISCONNECTED").Return(nil)
 
        var errEmpty error
@@ -718,9 +721,11 @@ func TestE2SetupRequestNotificationHandler_HandleExistingDisconnectedGnbSuccess(
        gnbToUpdate := getExpectedNodebForExistingRan(*nodebInfo, notificationRequest.Payload)
        gnbToUpdate2 := *gnbToUpdate
        gnbToUpdate2.ConnectionStatus = entities.ConnectionStatus_CONNECTED
        gnbToUpdate := getExpectedNodebForExistingRan(*nodebInfo, notificationRequest.Payload)
        gnbToUpdate2 := *gnbToUpdate
        gnbToUpdate2.ConnectionStatus = entities.ConnectionStatus_CONNECTED
+       gnbToUpdate2.SetupFromNetwork = true
        writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &gnbToUpdate2, gnbNodebRanName+"_CONNECTED").Return(nil)
        gnbToUpdate3 := *gnbToUpdate
        gnbToUpdate3.ConnectionStatus = entities.ConnectionStatus_CONNECTED
        writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &gnbToUpdate2, gnbNodebRanName+"_CONNECTED").Return(nil)
        gnbToUpdate3 := *gnbToUpdate
        gnbToUpdate3.ConnectionStatus = entities.ConnectionStatus_CONNECTED
+       gnbToUpdate3.SetupFromNetwork = true
        gnbToUpdate3.AssociatedE2TInstanceAddress = e2tInstanceFullAddress
        writerMock.On("UpdateNodebInfo", &gnbToUpdate3).Return(nil)
        e2tInstancesManagerMock.On("AddRansToInstance", e2tInstanceFullAddress, []string{gnbNodebRanName}).Return(nil)
        gnbToUpdate3.AssociatedE2TInstanceAddress = e2tInstanceFullAddress
        writerMock.On("UpdateNodebInfo", &gnbToUpdate3).Return(nil)
        e2tInstancesManagerMock.On("AddRansToInstance", e2tInstanceFullAddress, []string{gnbNodebRanName}).Return(nil)