From: idanshal Date: Thu, 23 Jul 2020 06:16:41 +0000 (+0000) Subject: [RIC-434] Update gNB Cells X-Git-Tag: R5_RC~27 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F4430%2F1;p=ric-plt%2Fe2mgr.git [RIC-434] Update gNB Cells Change-Id: I12580f9cc8a0f0e26d490f1fe6818fa059d60a07 Signed-off-by: idanshal --- diff --git a/Automation/Tests/Resource/Keywords.robot b/Automation/Tests/Resource/Keywords.robot index 4d046bf..b05e57e 100644 --- a/Automation/Tests/Resource/Keywords.robot +++ b/Automation/Tests/Resource/Keywords.robot @@ -33,7 +33,7 @@ Get Request node b gnb Sleep 1s GET ${getNodeb} -Update Ran request +Update Gnb request Sleep 1s PUT ${update_gnb_url} ${update_gnb_body} @@ -53,7 +53,7 @@ Set General Configuration request Sleep 1s PUT ${set_general_configuration} ${set_general_configuration_body} -Update Ran request not valid +Update Gnb request not valid Sleep 1s PUT ${update_gnb_url} ${update_gnb_body_notvalid} diff --git a/Automation/Tests/Resource/resource.robot b/Automation/Tests/Resource/resource.robot index 7fab1a1..86913ba 100644 --- a/Automation/Tests/Resource/resource.robot +++ b/Automation/Tests/Resource/resource.robot @@ -32,7 +32,7 @@ ${enb_ran_name} enb_test ${getNodeb} /v1/nodeb/${ranName} ${set_general_configuration} /v1/nodeb/parameters ${set_general_configuration_body} {"enableRic":false} -${update_gnb_url} /v1/nodeb/${ranName}/update +${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}]}]} @@ -72,3 +72,4 @@ ${save_general_configuration} SetGeneralConfigurationHandler.Handle - save ${set_and_publish_disconnect} RnibDataService.UpdateNodebInfoOnConnectionStatusInversion - stateChangeMessageChannel: RAN_CONNECTION_STATUS_CHANGE, event: gnb_208_092_303030_DISCONNECTED ${delete_enb_log_message} RAN name: ${enb_ran_name} - deleted successfully ${update_enb_log_message} RAN name: ${enb_ran_name} - Successfully updated eNB +${update_gnb_log_message} RAN name: ${ranName} - Successfully updated gNB cells diff --git a/Automation/Tests/Update_GNB/Update_gnb_Unhappy.robot b/Automation/Tests/Update_GNB/Update_gnb_Unhappy.robot index 5dae456..1c88457 100644 --- a/Automation/Tests/Update_GNB/Update_gnb_Unhappy.robot +++ b/Automation/Tests/Update_GNB/Update_gnb_Unhappy.robot @@ -35,9 +35,9 @@ ${url} ${e2mgr_address} *** Test Cases *** -Update Ran Unhappy +Update Gnb Unhappy Sleep 2s - Update Ran request not valid + Update Gnb request not valid Integer response status 400 Integer response body errorCode 402 String response body errorMessage Validation error diff --git a/Automation/Tests/Update_GNB/Update_gnb_happy.robot b/Automation/Tests/Update_GNB/Update_gnb_happy.robot index 45cdb97..87d18e6 100644 --- a/Automation/Tests/Update_GNB/Update_gnb_happy.robot +++ b/Automation/Tests/Update_GNB/Update_gnb_happy.robot @@ -35,9 +35,12 @@ ${url} ${e2mgr_address} *** Test Cases *** +Prepare Redis Monitor Log + Start Redis Monitor + Update gNB Sleep 2s - Update Ran request + Update Gnb request Integer response status 200 String response body ranName ${ranname} String response body connectionStatus CONNECTED @@ -46,13 +49,16 @@ Update gNB String response body gnb servedNrCells 0 nrNeighbourInfos 0 nrCgi one String response body gnb servedNrCells 0 servedNrCellInformation servedPlmns 0 whatever +prepare logs for tests + Remove log files + Save logs +E2M Logs - Verify Update + ${result} log_scripts.verify_log_message ${EXECDIR}/${e2mgr_log_filename} ${update_gnb_log_message} + Should Be Equal As Strings ${result} True +Redis Monitor Logs - Verify Publish + Redis Monitor Logs - Verify Publish To Manipulation Channel ${ranName} UPDATED - - - - - - - +[Teardown] + Stop Redis Monitor \ No newline at end of file diff --git a/Automation/output.xml b/Automation/output.xml new file mode 100644 index 0000000..531ee6b --- /dev/null +++ b/Automation/output.xml @@ -0,0 +1,1576 @@ + + + + + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Configuration Update test + + + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +ORAN Reset - ENDC RAN to RIC Scenario 1 + + + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +ORAN Reset API - ENDC RIC to RAN + + + + + +No keyword with name 'Prepare Simulator For Load Information' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Simulator For Load Information' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Simulator For Load Information' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Simulator For Load Information' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Simulator For Load Information' found. + + +No keyword with name 'Stop Simulator' found. +No keyword with name 'Stop Simulator' found. + +Suite setup failed: +No keyword with name 'Prepare Simulator For Load Information' found. + +Also suite teardown failed: +No keyword with name 'Stop Simulator' found. + + + +No keyword with name 'Prepare Simulator For Load Information' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Simulator For Load Information' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Simulator For Load Information' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Simulator For Load Information' found. + + +No keyword with name 'Stop Simulator' found. +No keyword with name 'Stop Simulator' found. + +Suite setup failed: +No keyword with name 'Prepare Simulator For Load Information' found. + +Also suite teardown failed: +No keyword with name 'Stop Simulator' found. + +ORAN Load Infomration scenarios + + + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +No keyword with name 'Delete All Sessions' found. +No keyword with name 'Delete All Sessions' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Also suite teardown failed: +No keyword with name 'Delete All Sessions' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +No keyword with name 'Delete All Sessions' found. +No keyword with name 'Delete All Sessions' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Also suite teardown failed: +No keyword with name 'Delete All Sessions' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +No keyword with name 'Delete All Sessions' found. +No keyword with name 'Delete All Sessions' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Also suite teardown failed: +No keyword with name 'Delete All Sessions' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +No keyword with name 'Delete All Sessions' found. +No keyword with name 'Delete All Sessions' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Also suite teardown failed: +No keyword with name 'Delete All Sessions' found. + +Resource status + + + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +No keyword with name 'Start Dbass' found. +No keyword with name 'Start Dbass' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Also suite teardown failed: +No keyword with name 'Start Dbass' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +No keyword with name 'Start RoutingManager Simulator' found. +No keyword with name 'Start RoutingManager Simulator' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Also suite teardown failed: +No keyword with name 'Start RoutingManager Simulator' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +X2-Setup ENB + + + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +ORAN Reset - X2 RAN to RIC Scenario 1 + + + + + +No keyword with name 'Prepare Enviorment' found. + + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + +Parent suite setup failed: +No keyword with name 'Prepare Enviorment' found. + + + +Runs the given command in the system and returns the RC and output. + +${dbass_remove} + +Variable '${dbass_remove}' not found. + + + +Runs the given command in the system and returns the RC and output. + +${dbass_start} + +Variable '${dbass_start}' not found. + + + +Pauses the test executed for the given time. + +5s + + + +Several failures occurred: + +1) Variable '${dbass_remove}' not found. + +2) Variable '${dbass_start}' not found. + +3) Execution terminated by signal + +Suite setup failed: +No keyword with name 'Prepare Enviorment' found. + +Also suite teardown failed: +Several failures occurred: + +1) Variable '${dbass_remove}' not found. + +2) Variable '${dbass_start}' not found. + +3) Execution terminated by signal + +ORAN Reset - RAN to RIC Scenario Unhappy + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +ORAN Reset API - X2 RIC to RAN + + + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +E2Term-Initialization + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +Get all nodes + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +Get all nodes + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +GetNodeb-GNB + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +ORAN health check + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +Keep Alive + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +ORAN Lost Connection scenarios + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +ORAN Red Button Scenarios + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +Setup Failure + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + + + + +robot:exit + +Test execution stopped due to a fatal error. + + + +Update Ran + + + + + + + + +Critical Tests +All Tests + + +NOT robot:exit +robot:exit + + +Automation +Automation.Deprecated +Automation.Deprecated.ConfigurationUpdate +Automation.Deprecated.ConfigurationUpdate.ConfigurationUpdate prepartations tests +Automation.Deprecated.ENDC Reset RAN TO RIC +Automation.Deprecated.ENDC Reset RAN TO RIC.Reset RAN Found +Automation.Deprecated.ENDC Reset RIC TO RAN +Automation.Deprecated.ENDC Reset RIC TO RAN.Reset Happy no cause +Automation.Deprecated.ENDC Reset RIC TO RAN.Reset Happy with cause +Automation.Deprecated.LoadInfomation +Automation.Deprecated.LoadInfomation.Loadinformation adding data and overwrite +Automation.Deprecated.LoadInfomation.Loadinformation verify saving +Automation.Deprecated.RedButton +Automation.Deprecated.RedButton.RedButton DISCONNECTED +Automation.Deprecated.RSM Resource Status +Automation.Deprecated.RSM Resource Status.Resource Status False Start +Automation.Deprecated.RSM Resource Status.Resource Status False Stop +Automation.Deprecated.RSM Resource Status.Resource Status True Start +Automation.Deprecated.RSM Resource Status.Resource Status True Stop +Automation.Deprecated.Unhappy +Automation.Deprecated.Unhappy.Reset HttpResponse400 +Automation.Deprecated.Unhappy.Reset HttpResponse400 wrongstate +Automation.Deprecated.Unhappy.Reset HttpResponse404 +Automation.Deprecated.Unhappy.Setup Request HttpResponse400 +Automation.Deprecated.Unhappy.Setup Request HttpResponse500 +Automation.Deprecated.Unhappy.Setup Request HttpResponse503 +Automation.Deprecated.Unhappy.Setup Request setup failure +Automation.Deprecated.X2-Setup +Automation.Deprecated.X2-Setup.X2 Setup Existing Assoc Test +Automation.Deprecated.X2-Setup.X2 Setup Existing Not Assoc Test +Automation.Deprecated.X2-Setup.X2 Setup reuqest test +Automation.Deprecated.X2 Reset RAN TO RIC +Automation.Deprecated.X2 Reset RAN TO RIC.Reset RAN Found +Automation.Deprecated.X2 Reset RAN TO RIC Unhappy +Automation.Deprecated.X2 Reset RAN TO RIC Unhappy.Reset RNIB +Automation.Deprecated.X2 Reset RIC TO RAN +Automation.Deprecated.X2 Reset RIC TO RAN.Reset Happy no cause +Automation.Deprecated.X2 Reset RIC TO RAN.Reset Happy with cause +Automation.FAILED TESTS +Automation.FAILED TESTS.Reset unhappy +Automation.Tests +Automation.Tests.E2Term Initialization +Automation.Tests.E2Term Initialization.E2Term Init Message Test +Automation.Tests.Get-All-Nodes +Automation.Tests.Get-All-Nodes.Get nodes Add nodes and get +Automation.Tests.Get-All-Nodes-Real +Automation.Tests.Get-All-Nodes-Real.Get all nodes run setup and get all +Automation.Tests.Get E2T Instances +Automation.Tests.Get E2T Instances.Get E2T Instances +Automation.Tests.GetNodeB-GNB +Automation.Tests.GetNodeB-GNB.GetNodeB-GNB test +Automation.Tests.Health +Automation.Tests.Health.Get Health Check +Automation.Tests.Health.Get Health Check Unhappy +Automation.Tests.KeepAlive +Automation.Tests.KeepAlive.Keep Alive Test +Automation.Tests.Lost Connection +Automation.Tests.Lost Connection.LostConnectionTestConnectedRan +Automation.Tests.RedButton +Automation.Tests.RedButton.RedButton CONNECTED +Automation.Tests.RedButton.RedButton CONNECTED SHUTDOWN CONNECTED +Automation.Tests.RedButton.RedButton SHUTDOWN SHUTDOWN +Automation.Tests.Setup Failure +Automation.Tests.Setup Failure.Setup failure +Automation.Tests.Unhappy +Automation.Tests.Unhappy.Get All Nodedb HttpResponse500 +Automation.Tests.Unhappy.Get Nodeb HttpResponse404 +Automation.Tests.Unhappy.Get Nodeb HttpResponse500 +Automation.Tests.Unhappy.RedButton HttpResponse500 +Automation.Tests.Update Ran +Automation.Tests.Update Ran.Update ran happy +Automation.Tests.Update Ran.Update ran Unhappy + + + +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ConfigurationUpdate/ConfigurationUpdate_prepartations_tests.robot' on line 26: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ConfigurationUpdate/ConfigurationUpdate_prepartations_tests.robot' on line 27: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ConfigurationUpdate/ConfigurationUpdate_prepartations_tests.robot' on line 29: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ConfigurationUpdate/ConfigurationUpdate_prepartations_tests.robot' on line 30: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ConfigurationUpdate/ConfigurationUpdate_prepartations_tests.robot' on line 33: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 25: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 29: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 30: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 33: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 34: Test library '../Scripts/find_error_script.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 35: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_no_cause.robot' on line 25: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_no_cause.robot' on line 26: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_no_cause.robot' on line 27: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_no_cause.robot' on line 29: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_no_cause.robot' on line 30: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_no_cause.robot' on line 31: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_with_cause.robot' on line 25: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_with_cause.robot' on line 26: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_with_cause.robot' on line 27: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_with_cause.robot' on line 29: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_with_cause.robot' on line 30: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/ENDC_Reset_RIC_TO_RAN/Reset_Happy_with_cause.robot' on line 31: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/LoadInfomation/Loadinformation_adding_data_and_overwrite.robot' on line 25: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/LoadInfomation/Loadinformation_adding_data_and_overwrite.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/LoadInfomation/Loadinformation_adding_data_and_overwrite.robot' on line 29: Test library '../Scripts/loadscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/LoadInfomation/Loadinformation_adding_data_and_overwrite.robot' on line 30: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/LoadInfomation/Loadinformation_verify_saving.robot' on line 25: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/LoadInfomation/Loadinformation_verify_saving.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/LoadInfomation/Loadinformation_verify_saving.robot' on line 29: Test library '../Scripts/loadscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/LoadInfomation/Loadinformation_verify_saving.robot' on line 30: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RedButton/RedButton_DISCONNECTED.robot' on line 24: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RedButton/RedButton_DISCONNECTED.robot' on line 25: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RedButton/RedButton_DISCONNECTED.robot' on line 26: Resource file 'red_button_keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RedButton/RedButton_DISCONNECTED.robot' on line 29: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_start.robot' on line 21: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_start.robot' on line 22: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_start.robot' on line 23: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 21: Test library '../Scripts/cleanup_db.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 22: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 26: Importing test library 'RequestsLibrary' failed: ImportError: No module named 'RequestsLibrary' +Traceback (most recent call last): + None +PYTHONPATH: + /usr/local/bin + /usr/lib/python35.zip + /usr/lib/python3.5 + /usr/lib/python3.5/plat-x86_64-linux-gnu + /usr/lib/python3.5/lib-dynload + /usr/local/lib/python3.5/dist-packages + /usr/lib/python3/dist-packages +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_start.robot' on line 25: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_start.robot' on line 26: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_start.robot' on line 28: Variable '${url_rsm}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_stop.robot' on line 21: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_stop.robot' on line 22: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_stop.robot' on line 23: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 21: Test library '../Scripts/cleanup_db.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 22: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 26: Importing test library 'RequestsLibrary' failed: ImportError: No module named 'RequestsLibrary' +Traceback (most recent call last): + None +PYTHONPATH: + /usr/local/bin + /usr/lib/python35.zip + /usr/lib/python3.5 + /usr/lib/python3.5/plat-x86_64-linux-gnu + /usr/lib/python3.5/lib-dynload + /usr/local/lib/python3.5/dist-packages + /usr/lib/python3/dist-packages +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_stop.robot' on line 25: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_stop.robot' on line 26: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_false_stop.robot' on line 28: Variable '${url_rsm}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_start.robot' on line 21: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_start.robot' on line 22: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_start.robot' on line 23: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 21: Test library '../Scripts/cleanup_db.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 22: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 26: Importing test library 'RequestsLibrary' failed: ImportError: No module named 'RequestsLibrary' +Traceback (most recent call last): + None +PYTHONPATH: + /usr/local/bin + /usr/lib/python35.zip + /usr/lib/python3.5 + /usr/lib/python3.5/plat-x86_64-linux-gnu + /usr/lib/python3.5/lib-dynload + /usr/local/lib/python3.5/dist-packages + /usr/lib/python3/dist-packages +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_start.robot' on line 25: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_start.robot' on line 26: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_start.robot' on line 28: Variable '${url_rsm}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_stop.robot' on line 21: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_stop.robot' on line 22: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_stop.robot' on line 23: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 21: Test library '../Scripts/cleanup_db.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 22: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_keywords.robot' on line 26: Importing test library 'RequestsLibrary' failed: ImportError: No module named 'RequestsLibrary' +Traceback (most recent call last): + None +PYTHONPATH: + /usr/local/bin + /usr/lib/python35.zip + /usr/lib/python3.5 + /usr/lib/python3.5/plat-x86_64-linux-gnu + /usr/lib/python3.5/lib-dynload + /usr/local/lib/python3.5/dist-packages + /usr/lib/python3/dist-packages +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_stop.robot' on line 25: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_stop.robot' on line 26: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/RSM_Resource_Status/resource_status_true_stop.robot' on line 28: Variable '${url_rsm}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Reset_HttpResponse400.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Reset_HttpResponse400.robot' on line 27: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Reset_HttpResponse400.robot' on line 29: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Reset_HttpResponse400_wrongstate.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Reset_HttpResponse400_wrongstate.robot' on line 27: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Reset_HttpResponse400_wrongstate.robot' on line 29: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Reset_HttpResponse404.robot' on line 25: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Reset_HttpResponse404.robot' on line 26: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Reset_HttpResponse404.robot' on line 28: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse400.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse400.robot' on line 27: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse400.robot' on line 29: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse500.robot' on line 25: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse500.robot' on line 26: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse500.robot' on line 27: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse503.robot' on line 25: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse503.robot' on line 26: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse503.robot' on line 27: Test library '../Scripts/e2mdbscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_HttpResponse503.robot' on line 28: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_setup_failure.robot' on line 25: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_setup_failure.robot' on line 26: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/Unhappy/Setup_Request_setup_failure.robot' on line 28: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_assoc_test.robot' on line 25: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_assoc_test.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_assoc_test.robot' on line 27: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_assoc_test.robot' on line 29: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_assoc_test.robot' on line 30: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_assoc_test.robot' on line 31: Test library '../Scripts/e2mdbscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_assoc_test.robot' on line 32: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_not_assoc_test.robot' on line 21: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_not_assoc_test.robot' on line 22: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_not_assoc_test.robot' on line 23: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_not_assoc_test.robot' on line 25: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_not_assoc_test.robot' on line 26: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_not_assoc_test.robot' on line 27: Test library '../Scripts/e2mdbscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/x2_setup_existing_not_assoc_test.robot' on line 28: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/X2_Setup_reuqest_test.robot' on line 25: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/X2_Setup_reuqest_test.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/X2_Setup_reuqest_test.robot' on line 27: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/X2_Setup_reuqest_test.robot' on line 29: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/X2_Setup_reuqest_test.robot' on line 30: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/X2_Setup_reuqest_test.robot' on line 31: Test library '../Scripts/e2mdbscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2-Setup/X2_Setup_reuqest_test.robot' on line 32: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 25: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 29: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 30: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 33: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC/Reset_RAN_Found.robot' on line 34: Test library '../Scripts/rsmscripts.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC_Unhappy/Reset_RNIB.robot' on line 25: Resource file '../Resource/resource.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC_Unhappy/Reset_RNIB.robot' on line 26: Resource file '../Resource/Keywords.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC_Unhappy/Reset_RNIB.robot' on line 29: Variable '${url}' not found. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC_Unhappy/Reset_RNIB.robot' on line 30: Resource file '../Resource/scripts_variables.robot' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC_Unhappy/Reset_RNIB.robot' on line 33: Test library '../Scripts/find_rmr_message.py' does not exist. +Error in file '/home/vagrant/oran_repo/e2mgr/Automation/deprecated/X2_Reset_RAN_TO_RIC_Unhappy/Reset_RNIB.robot' on line 34: Test library '../Scripts/find_error_script.py' does not exist. +Multiple test cases with name 'Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t instance' executed in test suite 'Automation.Tests.RedButton.RedButton CONNECTED SHUTDOWN CONNECTED'. + + diff --git a/E2Manager/app/main.go b/E2Manager/app/main.go index eebd773..59444a3 100644 --- a/E2Manager/app/main.go +++ b/E2Manager/app/main.go @@ -81,6 +81,7 @@ func main() { rmrReceiver := rmrreceiver.NewRmrReceiver(logger, rmrMessenger, notificationManager) nodebValidator := managers.NewNodebValidator() updateEnbManager := managers.NewUpdateEnbManager(logger, rnibDataService, nodebValidator) + updateGnbManager := managers.NewUpdateGnbManager(logger, rnibDataService, nodebValidator) e2tInstancesManager.ResetKeepAliveTimestampsForAllE2TInstances() @@ -89,7 +90,7 @@ func main() { go rmrReceiver.ListenAndHandle() go e2tKeepAliveWorker.Execute() - httpMsgHandlerProvider := httpmsghandlerprovider.NewIncomingRequestHandlerProvider(logger, rmrSender, config, rnibDataService, e2tInstancesManager, routingManagerClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, ranListManager) + httpMsgHandlerProvider := httpmsghandlerprovider.NewIncomingRequestHandlerProvider(logger, rmrSender, config, rnibDataService, e2tInstancesManager, routingManagerClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, updateGnbManager, ranListManager) rootController := controllers.NewRootController(rnibDataService) nodebController := controllers.NewNodebController(logger, httpMsgHandlerProvider) e2tController := controllers.NewE2TController(logger, httpMsgHandlerProvider) diff --git a/E2Manager/controllers/e2t_controller_test.go b/E2Manager/controllers/e2t_controller_test.go index 1b87f86..5a137c4 100644 --- a/E2Manager/controllers/e2t_controller_test.go +++ b/E2Manager/controllers/e2t_controller_test.go @@ -57,11 +57,11 @@ func setupE2TControllerTest(t *testing.T) (*E2TController, *mocks.RnibReaderMock ranListManager := managers.NewRanListManager(log, rnibDataService) ranAlarmService := services.NewRanAlarmService(log, config) - ranConnectStatusChangeManager := managers.NewRanConnectStatusChangeManager(log, rnibDataService,ranListManager, ranAlarmService) + ranConnectStatusChangeManager := managers.NewRanConnectStatusChangeManager(log, rnibDataService, ranListManager, ranAlarmService) nodebValidator := managers.NewNodebValidator() updateEnbManager := managers.NewUpdateEnbManager(log, rnibDataService, nodebValidator) - - handlerProvider := httpmsghandlerprovider.NewIncomingRequestHandlerProvider(log, nil, config, rnibDataService, e2tInstancesManager, nil, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, ranListManager) + updateGnbManager := managers.NewUpdateGnbManager(log, rnibDataService, nodebValidator) + handlerProvider := httpmsghandlerprovider.NewIncomingRequestHandlerProvider(log, nil, config, rnibDataService, e2tInstancesManager, nil, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, updateGnbManager, ranListManager) controller := NewE2TController(log, handlerProvider) return controller, readerMock } diff --git a/E2Manager/controllers/nodeb_controller.go b/E2Manager/controllers/nodeb_controller.go index 809c5b3..385824e 100644 --- a/E2Manager/controllers/nodeb_controller.go +++ b/E2Manager/controllers/nodeb_controller.go @@ -96,7 +96,7 @@ func (c *NodebController) UpdateGnb(writer http.ResponseWriter, r *http.Request) request.Gnb = &gnb request.RanName = ranName - c.handleRequest(writer, &r.Header, httpmsghandlerprovider.UpdateGnbRequest, request, true, http.StatusOK) + c.handleRequest(writer, &r.Header, httpmsghandlerprovider.UpdateGnbRequest, &request, true, http.StatusOK) } func (c *NodebController) UpdateEnb(writer http.ResponseWriter, r *http.Request) { diff --git a/E2Manager/controllers/nodeb_controller_test.go b/E2Manager/controllers/nodeb_controller_test.go index 9730320..a8a4e9f 100644 --- a/E2Manager/controllers/nodeb_controller_test.go +++ b/E2Manager/controllers/nodeb_controller_test.go @@ -321,8 +321,8 @@ func setupControllerTest(t *testing.T) (*NodebController, *mocks.RnibReaderMock, ranConnectStatusChangeManager := managers.NewRanConnectStatusChangeManager(log, rnibDataService, ranListManager, ranAlarmService) nodebValidator := managers.NewNodebValidator() updateEnbManager := managers.NewUpdateEnbManager(log, rnibDataService, nodebValidator) - - handlerProvider := httpmsghandlerprovider.NewIncomingRequestHandlerProvider(log, rmrSender, config, rnibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, ranListManager) + updateGnbManager := managers.NewUpdateGnbManager(log, rnibDataService, nodebValidator) + handlerProvider := httpmsghandlerprovider.NewIncomingRequestHandlerProvider(log, rmrSender, config, rnibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, updateGnbManager, ranListManager) controller := NewNodebController(log, handlerProvider) return controller, readerMock, writerMock, rmrMessengerMock, e2tInstancesManager, ranListManager } @@ -352,8 +352,9 @@ func setupDeleteEnbControllerTest(t *testing.T, preAddNbIdentity bool) (*NodebCo ranConnectStatusChangeManager := managers.NewRanConnectStatusChangeManager(log, rnibDataService, ranListManager, ranAlarmService) nodebValidator := managers.NewNodebValidator() updateEnbManager := managers.NewUpdateEnbManager(log, rnibDataService, nodebValidator) + updateGnbManager := managers.NewUpdateGnbManager(log, rnibDataService, nodebValidator) - handlerProvider := httpmsghandlerprovider.NewIncomingRequestHandlerProvider(log, rmrSender, config, rnibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, ranListManager) + handlerProvider := httpmsghandlerprovider.NewIncomingRequestHandlerProvider(log, rmrSender, config, rnibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, updateGnbManager, ranListManager) controller := NewNodebController(log, handlerProvider) return controller, readerMock, writerMock, nbIdentity } @@ -373,7 +374,7 @@ func TestShutdownHandlerRnibError(t *testing.T) { } func TestSetGeneralConfigurationHandlerRnibError(t *testing.T) { - controller, readerMock, _, _, _ , _:= setupControllerTest(t) + controller, readerMock, _, _, _, _ := setupControllerTest(t) configuration := &entities.GeneralConfiguration{} readerMock.On("GetGeneralConfiguration").Return(configuration, e2managererrors.NewRnibDbError()) @@ -512,7 +513,7 @@ func buildUpdateEnbRequest(context *controllerUpdateEnbTestContext) *http.Reques } func buildUpdateGnbRequest(context *controllerUpdateGnbTestContext) *http.Request { - updateGnbUrl := fmt.Sprintf("/nodeb/%s/update", RanName) + updateGnbUrl := fmt.Sprintf("/nodeb/gnb/%s", RanName) requestBody := getJsonRequestAsBuffer(context.requestBody) req, _ := http.NewRequest(http.MethodPut, updateGnbUrl, requestBody) req.Header.Set("Content-Type", "application/json") @@ -603,7 +604,7 @@ func controllerDeleteEnbTestExecuter(t *testing.T, context *controllerDeleteEnbT if context.getNodebInfoResult.rnibError == nil && context.getNodebInfoResult.nodebInfo.GetNodeType() == entities.Node_ENB { writerMock.On("RemoveEnb", context.getNodebInfoResult.nodebInfo).Return(nil) if preAddNbIdentity { - writerMock.On("RemoveNbIdentity", entities.Node_ENB, nbIdentity).Return(nil) + writerMock.On("RemoveNbIdentity", entities.Node_ENB, nbIdentity).Return(nil) } } writer := httptest.NewRecorder() @@ -614,6 +615,12 @@ func controllerDeleteEnbTestExecuter(t *testing.T, context *controllerDeleteEnbT assertControllerDeleteEnb(t, context, writer, readerMock, writerMock) } +/* +UpdateGnb UTs +*/ + +// BEGIN - UpdateGnb Validation Failure UTs + func TestControllerUpdateGnbEmptyServedNrCells(t *testing.T) { context := controllerUpdateGnbTestContext{ getNodebInfoResult: nil, @@ -733,6 +740,8 @@ func TestControllerUpdateGnbMissingNrNeighbourInformationRequiredProp(t *testing } } +// END - UpdateGnb Validation Failure UTs + func TestControllerUpdateGnbValidServedNrCellInformationGetNodebNotFound(t *testing.T) { context := controllerUpdateGnbTestContext{ getNodebInfoResult: &getNodebInfoResult{ @@ -780,6 +789,7 @@ func TestControllerUpdateGnbGetNodebSuccessInvalidGnbConfiguration(t *testing.T) RanName: RanName, ConnectionStatus: entities.ConnectionStatus_CONNECTED, AssociatedE2TInstanceAddress: AssociatedE2TInstanceAddress, + NodeType: entities.Node_ENB, }, rnibError: nil, }, @@ -793,8 +803,8 @@ func TestControllerUpdateGnbGetNodebSuccessInvalidGnbConfiguration(t *testing.T) }, }, }, - expectedStatusCode: http.StatusInternalServerError, - expectedJsonResponse: InternalErrorJson, + expectedStatusCode: http.StatusBadRequest, + expectedJsonResponse: ValidationFailureJson, } controllerUpdateGnbTestExecuter(t, &context) @@ -813,6 +823,7 @@ func TestControllerUpdateGnbGetNodebSuccessRemoveServedNrCellsFailure(t *testing ConnectionStatus: entities.ConnectionStatus_CONNECTED, AssociatedE2TInstanceAddress: AssociatedE2TInstanceAddress, Configuration: &entities.NodebInfo_Gnb{Gnb: &entities.Gnb{ServedNrCells: oldServedNrCells}}, + NodeType: entities.Node_GNB, }, rnibError: nil, }, @@ -849,6 +860,7 @@ func TestControllerUpdateGnbGetNodebSuccessUpdateGnbCellsFailure(t *testing.T) { ConnectionStatus: entities.ConnectionStatus_CONNECTED, AssociatedE2TInstanceAddress: AssociatedE2TInstanceAddress, Configuration: &entities.NodebInfo_Gnb{Gnb: &entities.Gnb{ServedNrCells: oldServedNrCells}}, + NodeType: entities.Node_GNB, }, rnibError: nil, }, @@ -869,8 +881,48 @@ func TestControllerUpdateGnbGetNodebSuccessUpdateGnbCellsFailure(t *testing.T) { controllerUpdateGnbTestExecuter(t, &context) } +func TestControllerUpdateGnbExistingEmptyCellsSuccess(t *testing.T) { + oldServedNrCells := []*entities.ServedNRCell{} + + context := controllerUpdateGnbTestContext{ + updateGnbCellsParams: &updateGnbCellsParams{ + err: nil, + }, + getNodebInfoResult: &getNodebInfoResult{ + nodebInfo: &entities.NodebInfo{ + RanName: RanName, + ConnectionStatus: entities.ConnectionStatus_CONNECTED, + AssociatedE2TInstanceAddress: AssociatedE2TInstanceAddress, + Configuration: &entities.NodebInfo_Gnb{Gnb: &entities.Gnb{ServedNrCells: oldServedNrCells}}, + NodeType: entities.Node_GNB, + }, + rnibError: nil, + }, + requestBody: map[string]interface{}{ + "servedNrCells": []interface{}{ + map[string]interface{}{ + "servedNrCellInformation": buildServedNrCellInformation(""), + "nrNeighbourInfos": []interface{}{ + buildNrNeighbourInformation(""), + }, + }, + }, + }, + expectedStatusCode: http.StatusOK, + expectedJsonResponse: "{\"ranName\":\"test\",\"connectionStatus\":\"CONNECTED\",\"nodeType\":\"GNB\",\"gnb\":{\"servedNrCells\":[{\"servedNrCellInformation\":{\"nrPci\":1,\"cellId\":\"whatever\",\"servedPlmns\":[\"whatever\"],\"nrMode\":\"FDD\",\"choiceNrMode\":{\"fdd\":{}}},\"nrNeighbourInfos\":[{\"nrPci\":1,\"nrCgi\":\"whatever\",\"nrMode\":\"FDD\",\"choiceNrMode\":{\"tdd\":{}}}]}]},\"associatedE2tInstanceAddress\":\"10.0.2.15:38000\"}", + } + + controllerUpdateGnbTestExecuter(t, &context) +} + func TestControllerUpdateGnbSuccess(t *testing.T) { + oldServedNrCells := generateServedNrCells("whatever1", "whatever2") + context := controllerUpdateGnbTestContext{ + removeServedNrCellsParams: &removeServedNrCellsParams{ + err: nil, + servedNrCells: oldServedNrCells, + }, updateGnbCellsParams: &updateGnbCellsParams{ err: nil, }, @@ -879,7 +931,8 @@ func TestControllerUpdateGnbSuccess(t *testing.T) { RanName: RanName, ConnectionStatus: entities.ConnectionStatus_CONNECTED, AssociatedE2TInstanceAddress: AssociatedE2TInstanceAddress, - Configuration: &entities.NodebInfo_Gnb{Gnb: &entities.Gnb{}}, + Configuration: &entities.NodebInfo_Gnb{Gnb: &entities.Gnb{ServedNrCells: oldServedNrCells}}, + NodeType: entities.Node_GNB, }, rnibError: nil, }, @@ -894,12 +947,16 @@ func TestControllerUpdateGnbSuccess(t *testing.T) { }, }, expectedStatusCode: http.StatusOK, - expectedJsonResponse: "{\"ranName\":\"test\",\"connectionStatus\":\"CONNECTED\",\"gnb\":{\"servedNrCells\":[{\"servedNrCellInformation\":{\"nrPci\":1,\"cellId\":\"whatever\",\"servedPlmns\":[\"whatever\"],\"nrMode\":\"FDD\",\"choiceNrMode\":{\"fdd\":{}}},\"nrNeighbourInfos\":[{\"nrPci\":1,\"nrCgi\":\"whatever\",\"nrMode\":\"FDD\",\"choiceNrMode\":{\"tdd\":{}}}]}]},\"associatedE2tInstanceAddress\":\"10.0.2.15:38000\"}", + expectedJsonResponse: "{\"ranName\":\"test\",\"connectionStatus\":\"CONNECTED\",\"nodeType\":\"GNB\",\"gnb\":{\"servedNrCells\":[{\"servedNrCellInformation\":{\"nrPci\":1,\"cellId\":\"whatever\",\"servedPlmns\":[\"whatever\"],\"nrMode\":\"FDD\",\"choiceNrMode\":{\"fdd\":{}}},\"nrNeighbourInfos\":[{\"nrPci\":1,\"nrCgi\":\"whatever\",\"nrMode\":\"FDD\",\"choiceNrMode\":{\"tdd\":{}}}]}]},\"associatedE2tInstanceAddress\":\"10.0.2.15:38000\"}", } controllerUpdateGnbTestExecuter(t, &context) } +/* +UpdateEnb UTs +*/ + func TestControllerUpdateEnbInvalidRequest(t *testing.T) { controller, _, _, _, _, _ := setupControllerTest(t) @@ -951,6 +1008,29 @@ func TestControllerUpdateEnbMissingEnb(t *testing.T) { controllerUpdateEnbTestExecuter(t, &context) } +func TestControllerUpdateEnbMissingRequiredServedCellProps(t *testing.T) { + + r := getUpdateEnbRequest("") + + for _, v := range ServedCellRequiredFields { + enb := r["enb"] + + enbMap, _ := enb.(map[string]interface{}) + + enbMap["servedCells"] = []interface{}{ + buildServedCell(v), + } + + context := controllerUpdateEnbTestContext{ + requestBody: r, + expectedStatusCode: http.StatusBadRequest, + expectedJsonResponse: ValidationFailureJson, + } + + controllerUpdateEnbTestExecuter(t, &context) + } +} + func TestControllerUpdateEnbValidServedCellsGetNodebNotFound(t *testing.T) { context := controllerUpdateEnbTestContext{ getNodebInfoResult: &getNodebInfoResult{ @@ -1053,6 +1133,31 @@ func TestControllerUpdateEnbGetNodebSuccessUpdateEnbFailure(t *testing.T) { controllerUpdateEnbTestExecuter(t, &context) } +func TestControllerUpdateEnbExistingEmptyCellsSuccess(t *testing.T) { + oldServedCells := []*entities.ServedCellInfo{} + context := controllerUpdateEnbTestContext{ + updateEnbCellsParams: &updateEnbCellsParams{ + err: nil, + }, + getNodebInfoResult: &getNodebInfoResult{ + nodebInfo: &entities.NodebInfo{ + RanName: RanName, + ConnectionStatus: entities.ConnectionStatus_CONNECTED, + AssociatedE2TInstanceAddress: AssociatedE2TInstanceAddress, + NodeType: entities.Node_ENB, + Configuration: &entities.NodebInfo_Enb{Enb: &entities.Enb{ServedCells: oldServedCells, EnbType: entities.EnbType_MACRO_ENB}}, + }, + rnibError: nil, + }, + requestBody: getUpdateEnbRequest(""), + expectedStatusCode: http.StatusOK, + expectedJsonResponse: "{\"ranName\":\"test\",\"connectionStatus\":\"CONNECTED\",\"nodeType\":\"ENB\",\"enb\":{\"enbType\":\"MACRO_ENB\",\"servedCells\":[{\"pci\":1,\"cellId\":\"whatever\",\"tac\":\"whatever3\",\"broadcastPlmns\":[\"whatever\"],\"choiceEutraMode\":{\"fdd\":{}},\"eutraMode\":\"FDD\"}]},\"associatedE2tInstanceAddress\":\"10.0.2.15:38000\"}", + } + + controllerUpdateEnbTestExecuter(t, &context) +} + + func TestControllerUpdateEnbSuccess(t *testing.T) { oldServedCells := generateServedCells("whatever1", "whatever2") context := controllerUpdateEnbTestContext{ @@ -1081,6 +1186,10 @@ func TestControllerUpdateEnbSuccess(t *testing.T) { controllerUpdateEnbTestExecuter(t, &context) } +/* +AddEnb UTs +*/ + func TestControllerAddEnbGetNodebInternalError(t *testing.T) { context := controllerAddEnbTestContext{ getNodebInfoResult: &getNodebInfoResult{ @@ -1208,29 +1317,6 @@ func TestControllerAddEnbMissingRequiredEnbProps(t *testing.T) { } } -func TestControllerUpdateEnbMissingRequiredServedCellProps(t *testing.T) { - - r := getUpdateEnbRequest("") - - for _, v := range ServedCellRequiredFields { - enb := r["enb"] - - enbMap, _ := enb.(map[string]interface{}) - - enbMap["servedCells"] = []interface{}{ - buildServedCell(v), - } - - context := controllerUpdateEnbTestContext{ - requestBody: r, - expectedStatusCode: http.StatusBadRequest, - expectedJsonResponse: ValidationFailureJson, - } - - controllerUpdateEnbTestExecuter(t, &context) - } -} - func TestControllerAddEnbMissingRequiredServedCellProps(t *testing.T) { r := getAddEnbRequest("") @@ -1287,6 +1373,10 @@ func TestControllerDeleteEnbGetNodebInternalError(t *testing.T) { controllerDeleteEnbTestExecuter(t, &context, false) } +/* +DeleteEnb UTs +*/ + func TestControllerDeleteEnbNodebNotExistsFailure(t *testing.T) { context := controllerDeleteEnbTestContext{ getNodebInfoResult: &getNodebInfoResult{ @@ -1331,6 +1421,10 @@ func getJsonRequestAsBuffer(requestJson map[string]interface{}) *bytes.Buffer { return b } +/* +GetNodeb UTs +*/ + func TestControllerGetNodebSuccess(t *testing.T) { ranName := "test" var rnibError error diff --git a/E2Manager/e2mgr_bak_2020-07-02.tar.gz b/E2Manager/e2mgr_bak_2020-07-02.tar.gz new file mode 100644 index 0000000..ba2356c Binary files /dev/null and b/E2Manager/e2mgr_bak_2020-07-02.tar.gz differ diff --git a/E2Manager/handlers/httpmsghandlers/delete_all_request_handler_test.go b/E2Manager/handlers/httpmsghandlers/delete_all_request_handler_test.go index 58971bd..3cf5b46 100644 --- a/E2Manager/handlers/httpmsghandlers/delete_all_request_handler_test.go +++ b/E2Manager/handlers/httpmsghandlers/delete_all_request_handler_test.go @@ -97,7 +97,7 @@ func mockHttpClientDissociateAllRans(httpClientMock *mocks.HttpClientMock, e2tAd } func TestGetE2TAddressesFailure(t *testing.T) { - h, readerMock, _, _, _ , _:= setupDeleteAllRequestHandlerTest(t) + h, readerMock, _, _, _, _ := setupDeleteAllRequestHandlerTest(t) readerMock.On("GetE2TAddresses").Return([]string{}, common.NewInternalError(errors.New("error"))) _, err := h.Handle(nil) assert.IsType(t, &e2managererrors.RnibDbError{}, err) @@ -105,7 +105,7 @@ func TestGetE2TAddressesFailure(t *testing.T) { } func TestOneRanGetE2TAddressesEmptyList(t *testing.T) { - h, readerMock, writerMock, _, _, ranListManager:= setupDeleteAllRequestHandlerTest(t) + h, readerMock, writerMock, _, _, ranListManager := setupDeleteAllRequestHandlerTest(t) nbIdentityList := []*entities.NbIdentity{{InventoryName: "RanName_1"}} readerMock.On("GetListNodebIds").Return(nbIdentityList, nil) @@ -116,9 +116,9 @@ func TestOneRanGetE2TAddressesEmptyList(t *testing.T) { } readerMock.On("GetE2TAddresses").Return([]string{}, nil) - nb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_DISCONNECTED,} + nb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_DISCONNECTED} readerMock.On("GetNodeb", "RanName_1").Return(nb1, nil) - updatedNb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN,} + updatedNb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN} writerMock.On("UpdateNodebInfo", updatedNb1).Return(nil) _, err = h.Handle(nil) assert.Nil(t, err) @@ -127,47 +127,38 @@ func TestOneRanGetE2TAddressesEmptyList(t *testing.T) { } func TestTwoRansGetE2TAddressesEmptyListOneGetNodebFailure(t *testing.T) { - h, readerMock, writerMock, _, _ , ranListManager := setupDeleteAllRequestHandlerTest(t) + h, readerMock, writerMock, _, _, ranListManager := setupDeleteAllRequestHandlerTest(t) readerMock.On("GetE2TAddresses").Return([]string{}, nil) nbIdentityList := []*entities.NbIdentity{{InventoryName: "RanName_1"}, {InventoryName: "RanName_2"}} readerMock.On("GetListNodebIds").Return(nbIdentityList, nil) - err := ranListManager.InitNbIdentityMap() - if err != nil { - t.Errorf("Error cannot init identity") - } + _ = ranListManager.InitNbIdentityMap() - nb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_DISCONNECTED,} - readerMock.On("GetNodeb", "RanName_1").Return(nb1, nil) + var err error + nb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_DISCONNECTED} + readerMock.On("GetNodeb", "RanName_1").Return(nb1, err) updatedNb1 := *nb1 updatedNb1.ConnectionStatus = entities.ConnectionStatus_SHUT_DOWN - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &updatedNb1, "RanName_1_DISCONNECTED").Return(nil) - - nodeb1NotAssociated := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN} - writerMock.On("UpdateNodebInfo", nodeb1NotAssociated).Return(nil) + writerMock.On("UpdateNodebInfo", &updatedNb1).Return(nil) var nb2 *entities.NodebInfo readerMock.On("GetNodeb", "RanName_2").Return(nb2, common.NewInternalError(errors.New("error"))) _, err = h.Handle(nil) assert.IsType(t, &e2managererrors.RnibDbError{}, err) - writerMock.AssertNumberOfCalls(t, "UpdateNodebInfo", 2) - writerMock.AssertNumberOfCalls(t, "UpdateNodebInfoOnConnectionStatusInversion", 0) + writerMock.AssertExpectations(t) readerMock.AssertExpectations(t) } func TestUpdateNodebInfoOnConnectionStatusInversionFailure(t *testing.T) { - h, readerMock, writerMock, _, _ , ranListManager := setupDeleteAllRequestHandlerTest(t) + h, readerMock, writerMock, _, _, ranListManager := setupDeleteAllRequestHandlerTest(t) readerMock.On("GetE2TAddresses").Return([]string{}, nil) nbIdentityList := []*entities.NbIdentity{{InventoryName: "RanName_1"}, {InventoryName: "RanName_2"}} readerMock.On("GetListNodebIds").Return(nbIdentityList, nil) - err := ranListManager.InitNbIdentityMap() - if err != nil { - t.Errorf("Error cannot init identity") - } + _ = ranListManager.InitNbIdentityMap() nb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_CONNECTED} readerMock.On("GetNodeb", "RanName_1").Return(nb1, nil) @@ -176,11 +167,10 @@ func TestUpdateNodebInfoOnConnectionStatusInversionFailure(t *testing.T) { updatedNb1.ConnectionStatus = entities.ConnectionStatus_SHUT_DOWN writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &updatedNb1, "RanName_1_DISCONNECTED").Return(common.NewInternalError(errors.New("error"))) - _, err = h.Handle(nil) + _, err := h.Handle(nil) assert.IsType(t, &e2managererrors.RnibDbError{}, err) - writerMock.AssertNumberOfCalls(t, "UpdateNodebInfo", 0) - writerMock.AssertNumberOfCalls(t, "UpdateNodebInfoOnConnectionStatusInversion", 1) + writerMock.AssertExpectations(t) readerMock.AssertExpectations(t) } @@ -196,14 +186,14 @@ func TestTwoRansGetE2TAddressesEmptyListOneUpdateNodebInfoFailure(t *testing.T) t.Errorf("Error cannot init identity") } - nb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_DISCONNECTED,} + nb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_DISCONNECTED} readerMock.On("GetNodeb", "RanName_1").Return(nb1, nil) - updatedNb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN,} + updatedNb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN} writerMock.On("UpdateNodebInfo", updatedNb1).Return(nil) - nb2 := &entities.NodebInfo{RanName: "RanName_2", ConnectionStatus: entities.ConnectionStatus_DISCONNECTED,} + nb2 := &entities.NodebInfo{RanName: "RanName_2", ConnectionStatus: entities.ConnectionStatus_DISCONNECTED} readerMock.On("GetNodeb", "RanName_2").Return(nb2, nil) - updatedNb2 := &entities.NodebInfo{RanName: "RanName_2", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN,} + updatedNb2 := &entities.NodebInfo{RanName: "RanName_2", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN} writerMock.On("UpdateNodebInfo", updatedNb2).Return(common.NewInternalError(errors.New("error"))) _, err = h.Handle(nil) assert.IsType(t, &e2managererrors.RnibDbError{}, err) @@ -262,7 +252,7 @@ func TestOneRanShutDown(t *testing.T) { nb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} readerMock.On("GetNodeb", "RanName_1").Return(nb1, nil) - nodeb1NotAssociated := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN,} + nodeb1NotAssociated := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN} writerMock.On("UpdateNodebInfo", nodeb1NotAssociated).Return(nil) readerMock.On("GetE2TAddresses").Return([]string{E2TAddress}, nil) @@ -295,7 +285,7 @@ func TestOneRanTryShuttingDownSucceedsClearFails(t *testing.T) { updatedNb1.ConnectionStatus = entities.ConnectionStatus_SHUTTING_DOWN writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &updatedNb1, "RanName_1_DISCONNECTED").Return(nil) - nodeb1NotAssociated := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + nodeb1NotAssociated := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", nodeb1NotAssociated).Return(nil) readerMock.On("GetE2TAddresses").Return([]string{E2TAddress}, nil) @@ -327,7 +317,7 @@ func TestOneRanTryShuttingDownUpdateNodebError(t *testing.T) { updatedNb1.ConnectionStatus = entities.ConnectionStatus_SHUTTING_DOWN writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &updatedNb1, "RanName_1_DISCONNECTED").Return(nil) - nodeb1NotAssociated := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + nodeb1NotAssociated := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", nodeb1NotAssociated).Return(common.NewInternalError(errors.New("error"))) _, err = h.Handle(nil) @@ -358,7 +348,7 @@ func TestOneRanTryShuttingDownSucceedsClearSucceedsRmrSendFails(t *testing.T) { updatedNb1.ConnectionStatus = entities.ConnectionStatus_SHUTTING_DOWN writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &updatedNb1, "RanName_1_DISCONNECTED").Return(nil) - nodeb1NotAssociated := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + nodeb1NotAssociated := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", nodeb1NotAssociated).Return(nil) readerMock.On("GetE2TAddresses").Return([]string{E2TAddress}, nil) @@ -492,7 +482,7 @@ func testOneRanTryShuttingDownSucceedsClearSucceedsRmrSucceedsRanStatusIsShuttin t.Errorf("Error cannot init identity") } - updatedNb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + updatedNb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", updatedNb1).Return(nil) readerMock.On("GetE2TAddresses").Return([]string{E2TAddress}, nil) e2tInstance := entities.E2TInstance{Address: E2TAddress, AssociatedRanList: []string{"RanName_1"}} @@ -507,7 +497,7 @@ func testOneRanTryShuttingDownSucceedsClearSucceedsRmrSucceedsRanStatusIsShuttin readerMock.On("GetListNodebIds").Return(nbIdentityList, nil) readerMock.On("GetNodeb", "RanName_1").Return(updatedNb1, nil) - updatedNb2 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN,} + updatedNb2 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUT_DOWN} writerMock.On("UpdateNodebInfo", updatedNb2).Return(nil) _, err = h.Handle(nil) assert.Nil(t, err) @@ -538,17 +528,17 @@ func TestSuccessTwoE2TInstancesSixRans(t *testing.T) { t.Errorf("Error cannot init identity") } - updatedNb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + updatedNb1 := &entities.NodebInfo{RanName: "RanName_1", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", updatedNb1).Return(nil) - updatedNb2 := &entities.NodebInfo{RanName: "RanName_2", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + updatedNb2 := &entities.NodebInfo{RanName: "RanName_2", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", updatedNb2).Return(nil) - updatedNb3 := &entities.NodebInfo{RanName: "RanName_3", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + updatedNb3 := &entities.NodebInfo{RanName: "RanName_3", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", updatedNb3).Return(nil) - updatedNb4 := &entities.NodebInfo{RanName: "RanName_4", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + updatedNb4 := &entities.NodebInfo{RanName: "RanName_4", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", updatedNb4).Return(nil) - updatedNb5 := &entities.NodebInfo{RanName: "RanName_5", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + updatedNb5 := &entities.NodebInfo{RanName: "RanName_5", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", updatedNb5).Return(nil) - updatedNb6 := &entities.NodebInfo{RanName: "RanName_6", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN,} + updatedNb6 := &entities.NodebInfo{RanName: "RanName_6", ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN} writerMock.On("UpdateNodebInfo", updatedNb6).Return(nil) readerMock.On("GetE2TAddresses").Return(e2tAddresses, nil) diff --git a/E2Manager/handlers/httpmsghandlers/update_gnb_request_handler.go b/E2Manager/handlers/httpmsghandlers/update_gnb_request_handler.go deleted file mode 100644 index 5e382b3..0000000 --- a/E2Manager/handlers/httpmsghandlers/update_gnb_request_handler.go +++ /dev/null @@ -1,225 +0,0 @@ -// -// Copyright 2019 AT&T Intellectual Property -// Copyright 2019 Nokia -// -// 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). - -package httpmsghandlers - -import ( - "e2mgr/e2managererrors" - "e2mgr/logger" - "e2mgr/models" - "e2mgr/services" - "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common" - "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities" - "github.com/pkg/errors" -) - -const VALIDATION_FAILURE_MESSAGE = "#UpdateGnbRequestHandler.Handle - validation failure: %s is a mandatory field" - -type UpdateGnbRequestHandler struct { - logger *logger.Logger - rNibDataService services.RNibDataService -} - -func NewUpdateGnbRequestHandler(logger *logger.Logger, rNibDataService services.RNibDataService) *UpdateGnbRequestHandler { - return &UpdateGnbRequestHandler{ - logger: logger, - rNibDataService: rNibDataService, - } -} - -func (h *UpdateGnbRequestHandler) Handle(request models.Request) (models.IResponse, error) { - - updateGnbRequest := request.(models.UpdateGnbRequest) - - h.logger.Infof("#UpdateGnbRequestHandler.Handle - Ran name: %s", updateGnbRequest.RanName) - - err := h.validateRequestBody(updateGnbRequest) - - if err != nil { - return nil, err - } - - nodebInfo, err := h.rNibDataService.GetNodeb(updateGnbRequest.RanName) - - if err != nil { - _, ok := err.(*common.ResourceNotFoundError) - if !ok { - h.logger.Errorf("#UpdateGnbRequestHandler.Handle - RAN name: %s - failed to get nodeb entity from RNIB. Error: %s", updateGnbRequest.RanName, err) - return nil, e2managererrors.NewRnibDbError() - } - - h.logger.Errorf("#UpdateGnbRequestHandler.Handle - RAN name: %s - RAN not found on RNIB. Error: %s", updateGnbRequest.RanName, err) - return nil, e2managererrors.NewResourceNotFoundError() - } - - err = h.updateGnbCells(nodebInfo, updateGnbRequest) - - if err != nil { - return nil, err - } - - return models.NewNodebResponse(nodebInfo), nil -} - -func (h *UpdateGnbRequestHandler) updateGnbCells(nodebInfo *entities.NodebInfo, updateGnbRequest models.UpdateGnbRequest) error { - - ranName := nodebInfo.RanName - gnb := nodebInfo.GetGnb() - - if gnb == nil { - h.logger.Errorf("#UpdateGnbRequestHandler.updateGnbCells - RAN name: %s - nodeb missing gnb configuration", ranName) - return e2managererrors.NewInternalError() - } - - if len(gnb.ServedNrCells) != 0 { - err := h.rNibDataService.RemoveServedNrCells(ranName, gnb.ServedNrCells) - - if err != nil { - h.logger.Errorf("#UpdateGnbRequestHandler.updateGnbCells - RAN name: %s - Failed removing served nr cells", ranName) - return e2managererrors.NewRnibDbError() - } - } - - gnb.ServedNrCells = updateGnbRequest.ServedNrCells - - err := h.rNibDataService.UpdateGnbCells(nodebInfo, updateGnbRequest.ServedNrCells) - - if err != nil { - h.logger.Errorf("#UpdateGnbRequestHandler.updateGnbCells - RAN name: %s - Failed updating GNB cells. Error: %s", ranName, err) - return e2managererrors.NewRnibDbError() - } - - h.logger.Infof("#UpdateGnbRequestHandler.updateGnbCells - RAN name: %s - Successfully updated GNB cells", ranName) - return nil -} - -func (h *UpdateGnbRequestHandler) validateRequestBody(updateGnbRequest models.UpdateGnbRequest) error { - - if len(updateGnbRequest.ServedNrCells) == 0 { - h.logger.Errorf(VALIDATION_FAILURE_MESSAGE+" and cannot be empty", "servedCells") - return e2managererrors.NewRequestValidationError() - } - - for _, servedNrCell := range updateGnbRequest.ServedNrCells { - if servedNrCell.ServedNrCellInformation == nil { - h.logger.Errorf(VALIDATION_FAILURE_MESSAGE+" and cannot be empty", "servedNrCellInformation") - return e2managererrors.NewRequestValidationError() - } - - err := isServedNrCellInformationValid(servedNrCell.ServedNrCellInformation) - - if err != nil { - h.logger.Errorf(VALIDATION_FAILURE_MESSAGE, err) - return e2managererrors.NewRequestValidationError() - } - - if len(servedNrCell.NrNeighbourInfos) == 0 { - continue - } - - for _, nrNeighbourInformation := range servedNrCell.NrNeighbourInfos { - - err := isNrNeighbourInformationValid(nrNeighbourInformation) - - if err != nil { - h.logger.Errorf(VALIDATION_FAILURE_MESSAGE, err) - return e2managererrors.NewRequestValidationError() - } - - } - } - - return nil -} - -func isServedNrCellInformationValid(servedNrCellInformation *entities.ServedNRCellInformation) error { - if servedNrCellInformation.CellId == "" { - return errors.New("cellId") - } - - if servedNrCellInformation.ChoiceNrMode == nil { - return errors.New("choiceNrMode") - } - - if servedNrCellInformation.NrMode == entities.Nr_UNKNOWN { - return errors.New("nrMode") - } - - if len(servedNrCellInformation.ServedPlmns) == 0 { - return errors.New("servedPlmns") - } - - return isServedNrCellInfoChoiceNrModeValid(servedNrCellInformation.ChoiceNrMode) -} - -func isServedNrCellInfoChoiceNrModeValid(choiceNrMode *entities.ServedNRCellInformation_ChoiceNRMode) error { - if choiceNrMode.Fdd != nil { - return isServedNrCellInfoFddValid(choiceNrMode.Fdd) - } - - if choiceNrMode.Tdd != nil { - return isServedNrCellInfoTddValid(choiceNrMode.Tdd) - } - - return errors.New("served nr cell fdd / tdd") -} - -func isServedNrCellInfoTddValid(tdd *entities.ServedNRCellInformation_ChoiceNRMode_TddInfo) error { - return nil -} - -func isServedNrCellInfoFddValid(fdd *entities.ServedNRCellInformation_ChoiceNRMode_FddInfo) error { - return nil -} - -func isNrNeighbourInformationValid(nrNeighbourInformation *entities.NrNeighbourInformation) error { - if nrNeighbourInformation.NrCgi == "" { - return errors.New("nrCgi") - } - - if nrNeighbourInformation.ChoiceNrMode == nil { - return errors.New("choiceNrMode") - } - - if nrNeighbourInformation.NrMode == entities.Nr_UNKNOWN { - return errors.New("nrMode") - } - - return isNrNeighbourInfoChoiceNrModeValid(nrNeighbourInformation.ChoiceNrMode) -} - -func isNrNeighbourInfoChoiceNrModeValid(choiceNrMode *entities.NrNeighbourInformation_ChoiceNRMode) error { - if choiceNrMode.Fdd != nil { - return isNrNeighbourInfoFddValid(choiceNrMode.Fdd) - } - - if choiceNrMode.Tdd != nil { - return isNrNeighbourInfoTddValid(choiceNrMode.Tdd) - } - - return errors.New("nr neighbour fdd / tdd") -} - -func isNrNeighbourInfoTddValid(tdd *entities.NrNeighbourInformation_ChoiceNRMode_TddInfo) error { - return nil -} - -func isNrNeighbourInfoFddValid(fdd *entities.NrNeighbourInformation_ChoiceNRMode_FddInfo) error { - return nil -} diff --git a/E2Manager/handlers/httpmsghandlers/update_nodeb_request_handler.go b/E2Manager/handlers/httpmsghandlers/update_nodeb_request_handler.go index 62eddbf..8b6b80c 100644 --- a/E2Manager/handlers/httpmsghandlers/update_nodeb_request_handler.go +++ b/E2Manager/handlers/httpmsghandlers/update_nodeb_request_handler.go @@ -70,10 +70,7 @@ func (h *UpdateNodebRequestHandler) Handle(request models.Request) (models.IResp return nil, err } - err = h.updateNodebManager.SetNodeb(nodebInfo, request) - if err != nil { - return nil, err - } + h.updateNodebManager.SetNodeb(nodebInfo, request) err = h.updateNodebManager.UpdateNodeb(nodebInfo) if err != nil { @@ -84,14 +81,12 @@ func (h *UpdateNodebRequestHandler) Handle(request models.Request) (models.IResp } func (h *UpdateNodebRequestHandler) getRanName(request models.Request) string { - - var ranName string - updateEnbRequest, ok := request.(*models.UpdateEnbRequest) - if !ok { - //updateGnbRequest := request.(*models.UpdateGnbRequest) - //ranName = updateGnbRequest.RanName - } else { - ranName = updateEnbRequest.RanName + switch v := request.(type) { + case *models.UpdateEnbRequest: + return v.RanName + case *models.UpdateGnbRequest: + return v.RanName } - return ranName -} \ No newline at end of file + + return "" +} diff --git a/E2Manager/handlers/rmrmsghandlers/e2_term_init_notification_handler_test.go b/E2Manager/handlers/rmrmsghandlers/e2_term_init_notification_handler_test.go index 710503f..80557e7 100644 --- a/E2Manager/handlers/rmrmsghandlers/e2_term_init_notification_handler_test.go +++ b/E2Manager/handlers/rmrmsghandlers/e2_term_init_notification_handler_test.go @@ -63,7 +63,7 @@ func initRanLostConnectionTest(t *testing.T) (*logger.Logger, E2TermInitNotifica e2tInstancesManagerMock := &mocks.E2TInstancesManagerMock{} - ranListManager := &mocks.RanListManagerMock{} + ranListManager := managers.NewRanListManager(logger, rnibDataService) ranAlarmService := &mocks.RanAlarmServiceMock{} ranConnectStatusChangeManager := managers.NewRanConnectStatusChangeManager(logger, rnibDataService,ranListManager, ranAlarmService) e2tAssociationManager := managers.NewE2TAssociationManager(logger, rnibDataService, e2tInstancesManagerMock, routingManagerClientMock, ranConnectStatusChangeManager) diff --git a/E2Manager/httpserver/http_server.go b/E2Manager/httpserver/http_server.go index 3ee48ef..b49ee50 100644 --- a/E2Manager/httpserver/http_server.go +++ b/E2Manager/httpserver/http_server.go @@ -49,7 +49,7 @@ func initializeRoutes(router *mux.Router, rootController controllers.IRootContro rr.HandleFunc("/{ranName}", nodebController.GetNodeb).Methods(http.MethodGet) rr.HandleFunc("/enb", nodebController.AddEnb).Methods(http.MethodPost) rr.HandleFunc("/enb/{ranName}", nodebController.DeleteEnb).Methods(http.MethodDelete) - rr.HandleFunc("/{ranName}/update", nodebController.UpdateGnb).Methods(http.MethodPut) + rr.HandleFunc("/gnb/{ranName}", nodebController.UpdateGnb).Methods(http.MethodPut) rr.HandleFunc("/enb/{ranName}", nodebController.UpdateEnb).Methods(http.MethodPut) rr.HandleFunc("/shutdown", nodebController.Shutdown).Methods(http.MethodPut) rr.HandleFunc("/parameters", nodebController.SetGeneralConfiguration).Methods(http.MethodPut) diff --git a/E2Manager/managers/i_update_nodeb_manager.go b/E2Manager/managers/i_update_nodeb_manager.go index 4f911f3..b67c07c 100644 --- a/E2Manager/managers/i_update_nodeb_manager.go +++ b/E2Manager/managers/i_update_nodeb_manager.go @@ -27,6 +27,6 @@ import ( type IUpdateNodebManager interface { Validate(request models.Request) error RemoveNodebCells(nodeb *entities.NodebInfo) error - SetNodeb(nodeb *entities.NodebInfo, request models.Request) error + SetNodeb(nodeb *entities.NodebInfo, request models.Request) UpdateNodeb(nodeb *entities.NodebInfo) error } diff --git a/E2Manager/managers/nodeb_validator.go b/E2Manager/managers/nodeb_validator.go index 41b854a..036ede5 100644 --- a/E2Manager/managers/nodeb_validator.go +++ b/E2Manager/managers/nodeb_validator.go @@ -31,6 +31,116 @@ func NewNodebValidator() *NodebValidator { return &NodebValidator{} } +func (h *NodebValidator) IsGnbValid(gnb *entities.Gnb) error { + if len(gnb.ServedNrCells) == 0 { + return errors.New("gnb.servedNrCells") + } + + for _, servedNrCell := range gnb.ServedNrCells { + if servedNrCell.ServedNrCellInformation == nil { + return errors.New("gnb.servedNrCellInformation") + } + + err := isServedNrCellInformationValid(servedNrCell.ServedNrCellInformation) + + if err != nil { + return err + } + + if len(servedNrCell.NrNeighbourInfos) == 0 { + continue + } + + for _, nrNeighbourInformation := range servedNrCell.NrNeighbourInfos { + + err := isNrNeighbourInformationValid(nrNeighbourInformation) + + if err != nil { + return err + } + + } + } + + return nil +} + +func isServedNrCellInformationValid(servedNrCellInformation *entities.ServedNRCellInformation) error { + if servedNrCellInformation.CellId == "" { + return errors.New("servedNrCellInformation.cellId") + } + + if servedNrCellInformation.ChoiceNrMode == nil { + return errors.New("servedNrCellInformation.choiceNrMode") + } + + if servedNrCellInformation.NrMode == entities.Nr_UNKNOWN { + return errors.New("servedNrCellInformation.nrMode") + } + + if len(servedNrCellInformation.ServedPlmns) == 0 { + return errors.New("servedNrCellInformation.servedPlmns") + } + + return isServedNrCellInfoChoiceNrModeValid(servedNrCellInformation.ChoiceNrMode) +} + +func isServedNrCellInfoChoiceNrModeValid(choiceNrMode *entities.ServedNRCellInformation_ChoiceNRMode) error { + if choiceNrMode.Fdd != nil { + return isServedNrCellInfoFddValid(choiceNrMode.Fdd) + } + + if choiceNrMode.Tdd != nil { + return isServedNrCellInfoTddValid(choiceNrMode.Tdd) + } + + return errors.New("servedNrCellInformation.choiceNrMode.fdd / servedNrCellInformation.choiceNrMode.tdd") +} + +func isServedNrCellInfoTddValid(tdd *entities.ServedNRCellInformation_ChoiceNRMode_TddInfo) error { + return nil +} + +func isServedNrCellInfoFddValid(fdd *entities.ServedNRCellInformation_ChoiceNRMode_FddInfo) error { + return nil +} + +func isNrNeighbourInformationValid(nrNeighbourInformation *entities.NrNeighbourInformation) error { + if nrNeighbourInformation.NrCgi == "" { + return errors.New("nrNeighbourInformation.nrCgi") + } + + if nrNeighbourInformation.ChoiceNrMode == nil { + return errors.New("nrNeighbourInformation.choiceNrMode") + } + + if nrNeighbourInformation.NrMode == entities.Nr_UNKNOWN { + return errors.New("nrNeighbourInformation.nrMode") + } + + return isNrNeighbourInfoChoiceNrModeValid(nrNeighbourInformation.ChoiceNrMode) +} + +func isNrNeighbourInfoChoiceNrModeValid(choiceNrMode *entities.NrNeighbourInformation_ChoiceNRMode) error { + if choiceNrMode.Fdd != nil { + return isNrNeighbourInfoFddValid(choiceNrMode.Fdd) + } + + if choiceNrMode.Tdd != nil { + return isNrNeighbourInfoTddValid(choiceNrMode.Tdd) + } + + return errors.New("nrNeighbourInformation.choiceNrMode.fdd / nrNeighbourInformation.choiceNrMode.tdd") +} + +func isNrNeighbourInfoTddValid(tdd *entities.NrNeighbourInformation_ChoiceNRMode_TddInfo) error { + return nil +} + +func isNrNeighbourInfoFddValid(fdd *entities.NrNeighbourInformation_ChoiceNRMode_FddInfo) error { + return nil +} + func (h *NodebValidator) IsEnbValid(enb *entities.Enb) error { if enb.EnbType == entities.EnbType_UNKNOWN_ENB_TYPE { return errors.New("enb.enbType") diff --git a/E2Manager/managers/update_enb_manager.go b/E2Manager/managers/update_enb_manager.go index b2cd7d7..79a8f49 100755 --- a/E2Manager/managers/update_enb_manager.go +++ b/E2Manager/managers/update_enb_manager.go @@ -48,7 +48,6 @@ func (h *UpdateEnbManager) Validate(request models.Request) error { h.logger.Infof("#UpdateEnbManager.Validate - Validate incoming request, ran name: %s", updateEnbRequest.RanName) - if err := h.validateRequestBody(updateEnbRequest); err != nil { h.logger.Errorf("#UpdateEnbManager.Validate - validation failure: %s is a mandatory field and cannot be empty", err) return err @@ -64,7 +63,14 @@ func (h *UpdateEnbManager) RemoveNodebCells(nodeb *entities.NodebInfo) error { return e2managererrors.NewRequestValidationError() } - err := h.rnibDataService.RemoveServedCells(nodeb.GetRanName(), nodeb.GetEnb().GetServedCells()) + servedCells := nodeb.GetEnb().GetServedCells() + + if len(servedCells) == 0 { + h.logger.Infof("#UpdateGnbManager.RemoveNodebCells - RAN name: %s - eNB cells are nil or empty - no cells to remove", nodeb.GetRanName()) + return nil + } + + err := h.rnibDataService.RemoveServedCells(nodeb.GetRanName(), servedCells) if err != nil { h.logger.Errorf("#UpdateEnbManager.RemoveNodebCells - RAN name: %s - Failed removing eNB served cells", nodeb.GetRanName()) return e2managererrors.NewRnibDbError() @@ -74,13 +80,9 @@ func (h *UpdateEnbManager) RemoveNodebCells(nodeb *entities.NodebInfo) error { return nil } -func (h *UpdateEnbManager) SetNodeb(nodeb *entities.NodebInfo, request models.Request) error { - +func (h *UpdateEnbManager) SetNodeb(nodeb *entities.NodebInfo, request models.Request) { updateEnbRequest := request.(*models.UpdateEnbRequest) - nodeb.Configuration = &entities.NodebInfo_Enb{Enb: updateEnbRequest.Enb} - - return nil } func (h *UpdateEnbManager) UpdateNodeb(nodeb *entities.NodebInfo) error { @@ -106,4 +108,4 @@ func (h *UpdateEnbManager) validateRequestBody(request *models.UpdateEnbRequest) } return nil -} \ No newline at end of file +} diff --git a/E2Manager/managers/update_gnb_manager.go b/E2Manager/managers/update_gnb_manager.go new file mode 100644 index 0000000..8f1f54c --- /dev/null +++ b/E2Manager/managers/update_gnb_manager.go @@ -0,0 +1,96 @@ +// +// Copyright 2019 AT&T Intellectual Property +// Copyright 2019 Nokia +// +// 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). + +package managers + +import ( + "e2mgr/e2managererrors" + "e2mgr/logger" + "e2mgr/models" + "e2mgr/services" + "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities" +) + +type UpdateGnbManager struct { + logger *logger.Logger + rnibDataService services.RNibDataService + nodebValidator *NodebValidator +} + +func NewUpdateGnbManager(logger *logger.Logger, rnibDataService services.RNibDataService, nodebValidator *NodebValidator) *UpdateGnbManager { + return &UpdateGnbManager{ + logger: logger, + rnibDataService: rnibDataService, + nodebValidator: nodebValidator, + } +} + +func (h *UpdateGnbManager) Validate(request models.Request) error { + + updateGnbRequest := request.(*models.UpdateGnbRequest) + + if err := h.nodebValidator.IsGnbValid(updateGnbRequest.Gnb); err != nil { + h.logger.Errorf("#UpdateGnbManager.Validate - RAN name: %s - validation failure: %s is a mandatory field and cannot be empty", updateGnbRequest.RanName, err) + return err + } + + return nil +} + +func (h *UpdateGnbManager) RemoveNodebCells(nodeb *entities.NodebInfo) error { + + if nodeb.NodeType != entities.Node_GNB { + h.logger.Errorf("#UpdateGnbManager.RemoveNodebCells - RAN name: %s - node type isn't gNB", nodeb.GetRanName()) + return e2managererrors.NewRequestValidationError() + } + + servedNrCells := nodeb.GetGnb().GetServedNrCells() + + if len(servedNrCells) == 0 { + h.logger.Infof("#UpdateGnbManager.RemoveNodebCells - RAN name: %s - gNB cells are nil or empty - no cells to remove", nodeb.GetRanName()) + return nil + } + + err := h.rnibDataService.RemoveServedNrCells(nodeb.GetRanName(), servedNrCells) + if err != nil { + h.logger.Errorf("#UpdateGnbManager.RemoveNodebCells - RAN name: %s - Failed removing gNB cells", nodeb.GetRanName()) + return e2managererrors.NewRnibDbError() + } + + h.logger.Infof("#UpdateGnbManager.RemoveNodebCells - RAN name: %s - Successfully removed gNB cells", nodeb.GetRanName()) + return nil +} + +func (h *UpdateGnbManager) SetNodeb(nodeb *entities.NodebInfo, request models.Request) { + + updateGnbRequest := request.(*models.UpdateGnbRequest) + nodeb.GetGnb().ServedNrCells = updateGnbRequest.ServedNrCells +} + +func (h *UpdateGnbManager) UpdateNodeb(nodeb *entities.NodebInfo) error { + + err := h.rnibDataService.UpdateGnbCells(nodeb, nodeb.GetGnb().GetServedNrCells()) + if err != nil { + h.logger.Errorf("#UpdateGnbManager.UpdateNodeb - RAN name: %s - Failed updating gNB cells. Error: %s", nodeb.GetRanName(), err) + return e2managererrors.NewRnibDbError() + } + h.logger.Infof("#UpdateGnbManager.UpdateNodeb - RAN name: %s - Successfully updated gNB cells", nodeb.GetRanName()) + + return nil +} \ No newline at end of file diff --git a/E2Manager/providers/httpmsghandlerprovider/incoming_request_handler_provider.go b/E2Manager/providers/httpmsghandlerprovider/incoming_request_handler_provider.go index 96f7e0e..d747669 100644 --- a/E2Manager/providers/httpmsghandlerprovider/incoming_request_handler_provider.go +++ b/E2Manager/providers/httpmsghandlerprovider/incoming_request_handler_provider.go @@ -51,16 +51,16 @@ type IncomingRequestHandlerProvider struct { ranConnectStatusChangeManager managers.IRanConnectStatusChangeManager } -func NewIncomingRequestHandlerProvider(logger *logger.Logger, rmrSender *rmrsender.RmrSender, config *configuration.Configuration, rNibDataService services.RNibDataService, e2tInstancesManager managers.IE2TInstancesManager, rmClient clients.IRoutingManagerClient, ranConnectStatusChangeManager managers.IRanConnectStatusChangeManager, nodebValidator *managers.NodebValidator, updateEnbManager managers.IUpdateNodebManager, ranListManager managers.RanListManager) *IncomingRequestHandlerProvider { +func NewIncomingRequestHandlerProvider(logger *logger.Logger, rmrSender *rmrsender.RmrSender, config *configuration.Configuration, rNibDataService services.RNibDataService, e2tInstancesManager managers.IE2TInstancesManager, rmClient clients.IRoutingManagerClient, ranConnectStatusChangeManager managers.IRanConnectStatusChangeManager, nodebValidator *managers.NodebValidator, updateEnbManager managers.IUpdateNodebManager, updateGnbManager managers.IUpdateNodebManager, ranListManager managers.RanListManager) *IncomingRequestHandlerProvider { return &IncomingRequestHandlerProvider{ - requestMap: initRequestHandlerMap(logger, rmrSender, config, rNibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, ranListManager), + requestMap: initRequestHandlerMap(logger, rmrSender, config, rNibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, updateGnbManager, ranListManager), logger: logger, ranConnectStatusChangeManager: ranConnectStatusChangeManager, } } -func initRequestHandlerMap(logger *logger.Logger, rmrSender *rmrsender.RmrSender, config *configuration.Configuration, rNibDataService services.RNibDataService, e2tInstancesManager managers.IE2TInstancesManager, rmClient clients.IRoutingManagerClient, ranConnectStatusChangeManager managers.IRanConnectStatusChangeManager, nodebValidator *managers.NodebValidator, updateEnbManager managers.IUpdateNodebManager, ranListManager managers.RanListManager) map[IncomingRequest]httpmsghandlers.RequestHandler { +func initRequestHandlerMap(logger *logger.Logger, rmrSender *rmrsender.RmrSender, config *configuration.Configuration, rNibDataService services.RNibDataService, e2tInstancesManager managers.IE2TInstancesManager, rmClient clients.IRoutingManagerClient, ranConnectStatusChangeManager managers.IRanConnectStatusChangeManager, nodebValidator *managers.NodebValidator, updateEnbManager managers.IUpdateNodebManager, updateGnbManager managers.IUpdateNodebManager, ranListManager managers.RanListManager) map[IncomingRequest]httpmsghandlers.RequestHandler { return map[IncomingRequest]httpmsghandlers.RequestHandler{ ShutdownRequest: httpmsghandlers.NewDeleteAllRequestHandler(logger, rmrSender, config, rNibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, ranListManager), @@ -69,7 +69,7 @@ func initRequestHandlerMap(logger *logger.Logger, rmrSender *rmrsender.RmrSender GetNodebRequest: httpmsghandlers.NewGetNodebRequestHandler(logger, rNibDataService), GetNodebIdListRequest: httpmsghandlers.NewGetNodebIdListRequestHandler(logger, rNibDataService, ranListManager), GetE2TInstancesRequest: httpmsghandlers.NewGetE2TInstancesRequestHandler(logger, e2tInstancesManager), - UpdateGnbRequest: httpmsghandlers.NewUpdateGnbRequestHandler(logger, rNibDataService), + UpdateGnbRequest: httpmsghandlers.NewUpdateNodebRequestHandler(logger, rNibDataService, updateGnbManager), UpdateEnbRequest: httpmsghandlers.NewUpdateNodebRequestHandler(logger, rNibDataService, updateEnbManager), AddEnbRequest: httpmsghandlers.NewAddEnbRequestHandler(logger, rNibDataService, nodebValidator, ranListManager), DeleteEnbRequest: httpmsghandlers.NewDeleteEnbRequestHandler(logger, rNibDataService, ranListManager), diff --git a/E2Manager/providers/httpmsghandlerprovider/incoming_request_handler_provider_test.go b/E2Manager/providers/httpmsghandlerprovider/incoming_request_handler_provider_test.go index 0b662df..761edaf 100644 --- a/E2Manager/providers/httpmsghandlerprovider/incoming_request_handler_provider_test.go +++ b/E2Manager/providers/httpmsghandlerprovider/incoming_request_handler_provider_test.go @@ -59,8 +59,8 @@ func setupTest(t *testing.T) *IncomingRequestHandlerProvider { ranConnectStatusChangeManager := managers.NewRanConnectStatusChangeManager(log, rnibDataService, ranListManager, ranAlarmService) nodebValidator := managers.NewNodebValidator() updateEnbManager := managers.NewUpdateEnbManager(log, rnibDataService, nodebValidator) - - return NewIncomingRequestHandlerProvider(log, rmrSender, configuration.ParseConfiguration(), rnibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, ranListManager) + updateGnbManager := managers.NewUpdateEnbManager(log, rnibDataService, nodebValidator) + return NewIncomingRequestHandlerProvider(log, rmrSender, configuration.ParseConfiguration(), rnibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager, nodebValidator, updateEnbManager, updateGnbManager, ranListManager) } func TestNewIncomingRequestHandlerProvider(t *testing.T) { diff --git a/E2Manager/rNibWriter/rNibWriter.go b/E2Manager/rNibWriter/rNibWriter.go index 4c84d49..3069258 100644 --- a/E2Manager/rNibWriter/rNibWriter.go +++ b/E2Manager/rNibWriter/rNibWriter.go @@ -69,6 +69,10 @@ func GetRNibWriter(sdl common.ISdlInstance, rnibWriterConfig configuration.RnibW return &rNibWriterInstance{sdl: sdl, rnibWriterConfig: rnibWriterConfig} } +func getChannelsAndEventsPair(channel string, ranName string, event string) []string { + return []string{channel, fmt.Sprintf("%s_%s", ranName, event)} +} + func (w *rNibWriterInstance) AddNbIdentity(nodeType entities.Node_Type, nbIdentity *entities.NbIdentity) error { nbIdData, err := proto.Marshal(nbIdentity) @@ -163,7 +167,8 @@ func (w *rNibWriterInstance) SaveNodeb(nodebInfo *entities.NodebInfo) error { } if nodebInfo.GetNodeType() == entities.Node_ENB { - err = w.sdl.SetAndPublish([]string{w.rnibWriterConfig.RanManipulationMessageChannel, fmt.Sprintf("%s_%s", nodebInfo.RanName, RanAddedEvent)}, pairs) + channelsAndEvents := getChannelsAndEventsPair(w.rnibWriterConfig.RanManipulationMessageChannel, nodebInfo.RanName, RanAddedEvent) + err = w.sdl.SetAndPublish(channelsAndEvents, pairs) } else { err = w.sdl.Set(pairs) } @@ -189,7 +194,8 @@ func (w *rNibWriterInstance) UpdateGnbCells(nodebInfo *entities.NodebInfo, serve return err } - err = w.sdl.Set(pairs) + channelsAndEvents := getChannelsAndEventsPair(w.rnibWriterConfig.RanManipulationMessageChannel, nodebInfo.RanName, RanUpdatedEvent) + err = w.sdl.SetAndPublish(channelsAndEvents, pairs) if err != nil { return common.NewInternalError(err) @@ -452,7 +458,8 @@ func (w *rNibWriterInstance) RemoveEnb(nodebInfo *entities.NodebInfo) error { return err } - err = w.sdl.RemoveAndPublish([]string{w.rnibWriterConfig.RanManipulationMessageChannel, fmt.Sprintf("%s_%s", nodebInfo.RanName, RanDeletedEvent)}, keysToRemove) + channelsAndEvents := getChannelsAndEventsPair(w.rnibWriterConfig.RanManipulationMessageChannel, nodebInfo.RanName, RanDeletedEvent) + err = w.sdl.RemoveAndPublish(channelsAndEvents, keysToRemove) if err != nil { return common.NewInternalError(err) @@ -475,7 +482,8 @@ func (w *rNibWriterInstance) UpdateEnb(nodebInfo *entities.NodebInfo, servedCell return err } - err = w.sdl.SetAndPublish([]string{w.rnibWriterConfig.RanManipulationMessageChannel, fmt.Sprintf("%s_%s", nodebInfo.RanName, RanUpdatedEvent)}, pairs) + channelsAndEvents := getChannelsAndEventsPair(w.rnibWriterConfig.RanManipulationMessageChannel, nodebInfo.RanName, RanUpdatedEvent) + err = w.sdl.SetAndPublish(channelsAndEvents, pairs) if err != nil { return common.NewInternalError(err) @@ -531,4 +539,4 @@ func appendGnbCells(inventoryName string, cells []*entities.ServedNRCell, pairs pairs = append(pairs, key, cellData) } return pairs, nil -} \ No newline at end of file +} diff --git a/E2Manager/rNibWriter/rNibWriter_test.go b/E2Manager/rNibWriter/rNibWriter_test.go index f99f69e..0c92aa8 100644 --- a/E2Manager/rNibWriter/rNibWriter_test.go +++ b/E2Manager/rNibWriter/rNibWriter_test.go @@ -141,7 +141,7 @@ func TestUpdateGnbCellsInvalidNodebInfoFailure(t *testing.T) { w, sdlInstanceMock := initSdlInstanceMock(namespace) servedNrCells := generateServedNrCells("test1", "test2") nodebInfo := &entities.NodebInfo{} - sdlInstanceMock.AssertNotCalled(t, "Set") + sdlInstanceMock.AssertNotCalled(t, "SetAndPublish") rNibErr := w.UpdateGnbCells(nodebInfo, servedNrCells) assert.IsType(t, &common.ValidationError{}, rNibErr) } @@ -182,7 +182,7 @@ func TestUpdateGnbCellsInvalidCellFailure(t *testing.T) { servedNrCells := []*entities.ServedNRCell{{ServedNrCellInformation: &entities.ServedNRCellInformation{}}} nodebInfo := generateNodebInfo(inventoryName, entities.Node_GNB, plmnId, nbId) nodebInfo.GetGnb().ServedNrCells = servedNrCells - sdlInstanceMock.AssertNotCalled(t, "Set") + sdlInstanceMock.AssertNotCalled(t, "SetAndPublish") rNibErr := w.UpdateGnbCells(nodebInfo, servedNrCells) assert.IsType(t, &common.ValidationError{}, rNibErr) } @@ -252,7 +252,7 @@ func TestUpdateGnbCellsSdlFailure(t *testing.T) { nodebInfo := generateNodebInfo(inventoryName, entities.Node_GNB, plmnId, nbId) nodebInfo.GetGnb().ServedNrCells = servedNrCells setExpected := getUpdateGnbCellsSetExpected(t, nodebInfo, servedNrCells) - sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(errors.New("expected error")) + sdlInstanceMock.On("SetAndPublish", []string{"RAN_MANIPULATION", inventoryName + "_" + RanUpdatedEvent}, []interface{}{setExpected}).Return(errors.New("expected error")) rNibErr := w.UpdateGnbCells(nodebInfo, servedNrCells) assert.IsType(t, &common.InternalError{}, rNibErr) } @@ -267,7 +267,7 @@ func TestUpdateGnbCellsSuccess(t *testing.T) { nodebInfo.GetGnb().ServedNrCells = servedNrCells setExpected := getUpdateGnbCellsSetExpected(t, nodebInfo, servedNrCells) var e error - sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e) + sdlInstanceMock.On("SetAndPublish",[]string{"RAN_MANIPULATION", inventoryName + "_" + RanUpdatedEvent}, []interface{}{setExpected}).Return(e) rNibErr := w.UpdateGnbCells(nodebInfo, servedNrCells) assert.Nil(t, rNibErr) } diff --git a/Swagger/E2Manager_API.yaml b/Swagger/E2Manager_API.yaml index b8b6dbd..78d06ce 100644 --- a/Swagger/E2Manager_API.yaml +++ b/Swagger/E2Manager_API.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: E2 Manager Service description: E2 Manager Service APIs - version: 5.2.18 + version: 5.2.21 servers: - url: 'http://{apiRoot}/v1' variables: @@ -47,11 +47,43 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' + /nodeb/enb: + post: + summary: Add eNB + tags: + - nodeb + operationId: AddEnb + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddEnbRequest' + required: true + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/NodebResponse' + '400': + description: Invalid input + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: Internal error + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '/nodeb/enb/{ranName}': delete: tags: - nodeb - summary: Delete ENB + summary: Delete eNB operationId: DeleteEnb parameters: - name: ranName @@ -88,7 +120,7 @@ paths: put: tags: - nodeb - summary: Update ENB + summary: Update eNB operationId: UpdateEnb parameters: - name: ranName @@ -122,9 +154,9 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' - '/nodeb/{ranName}/update': + '/nodeb/gnb/{ranName}': put: - summary: Update GNB + summary: Update gNB Cells tags: - nodeb operationId: UpdateGnb @@ -260,37 +292,6 @@ paths: application/problem+json: schema: $ref: '#/components/schemas/ErrorResponse' - /nodeb/enb: - post: - summary: Add ENB - tags: - - nodeb - operationId: AddEnb - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AddEnbRequest' - required: true - responses: - '200': - description: Successful operation - content: - application/json: - schema: - $ref: '#/components/schemas/NodebResponse' - '400': - description: Invalid input - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' - '500': - description: Internal error - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ErrorResponse' components: schemas: UpdateGnbRequest: