Library REST ${url}
-*** Variables ***
-${Run_Config} docker exec gnbe2_simu pkill gnbe2_simu -INT
-${Save_e2_log} docker logs --tail 300 gnbe2_simu > gnb.log
-${Save_e2mgr_log} docker logs --tail 300 e2mgr > e2mgr.log
*** Test Cases ***
X2 - Setup and Get
Library Process
Library ${CURDIR}/loadscripts.py
Library REST ${url}
-
+Suite Teardown Stop Simulator
*** Test Cases ***
Library Process
Library ${CURDIR}/loadscripts.py
Library REST ${url}
-
+Suite Teardown Stop Simulator
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+*** Settings ***
+Suite Setup Prepare Enviorment
+Resource ../Resource/resource.robot
+Resource ../Resource/Keywords.robot
+Library OperatingSystem
+Library Collections
+Library REST ${url}
+
+
+
+
+
+*** Test Cases ***
+
+Pre Condition for Connecting - no simu
+ Run And Return Rc And Output ${stop_simu}
+ ${result}= Run And Return Rc And Output ${docker_command}
+ Should Be Equal As Integers ${result[1]} 4
+
+
+Prepare Ran in Connecting connectionStatus
+ Sleep 1s
+ Post Request setup node b x-2
+ Integer response status 200
+ Sleep 1s
+ GET /v1/nodeb/test1
+ Integer response status 200
+ String response body ranName test1
+ #String response body connectionStatus CONNECTING
+
+
+
+Verfiy Disconnected ConnectionStatus
+ Sleep 1s
+ GET /v1/nodeb/test1
+ Integer response status 200
+ String response body ranName test1
+ String response body connectionStatus DISCONNECTED
+ Integer response body connectionAttempts 3
+
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+*** Settings ***
+Documentation ORAN Lost Connection scenarios
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+*** Settings ***
+Suite Setup Prepare Enviorment
+Resource ../Resource/resource.robot
+Resource ../Resource/Keywords.robot
+Library OperatingSystem
+Library Collections
+Library REST ${url}
+
+
+
+
+*** Test Cases ***
+
+Prepare Ran in Connected connectionStatus
+ Post Request setup node b x-2
+ Integer response status 200
+ Sleep 1s
+ GET /v1/nodeb/test1
+ Integer response status 200
+ String response body ranName test1
+ String response body connectionStatus CONNECTED
+
+Run Reset from RAN
+ Run ${Run_Config}
+ Sleep 1s
+
+Remove log files
+ Remove File ${EXECDIR}/gnb.log
+ Remove File ${EXECDIR}/e2mgr.log
+
+Save logs
+ Sleep 1s
+ Run ${Save_e2_log}
+ Run ${Save_e2mgr_log}
\ No newline at end of file
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+
+def verify(directory):
+
+ file = 'e2mgr.log'
+
+ path = '/'
+
+ file_path = directory + path + file
+
+ f = open(file_path,'r')
+
+ found_message_10070 = False
+ found_message_10071 = False
+
+ for l in f:
+ if l.find('MType: 10070') > 0 and l.find('Meid: \\"test1\\"') > 0:
+ found_message_10070 = True
+ elif l.find('MType: 10071') > 0 and l.find('Meid: \\"test1\\"') > 0:
+ found_message_10071 = True
+
+ if found_message_10070 and found_message_10071:
+ break
+
+ if found_message_10070 and found_message_10071:
+ return True
+ else:
+ return False
+
+
+
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+
+*** Settings ***
+Library String
+Library OperatingSystem
+Library Process
+Library ${CURDIR}/Reset_Ran_To_Ric_Verify_logs.py
+
+
+*** Test Cases ***
+Verify logs - Reset Sent by simulator
+ ${Reset}= Grep File ./gnb.log ResetRequest has been sent
+ #Log to console ${Reset}
+ Should Be Equal ${Reset} gnbe2_simu: ResetRequest has been sent
+
+Verify logs - e2mgr logs
+ ${result} Reset_Ran_To_Ric_Verify_logs.verify ${EXECDIR}
+ Should Be Equal As Strings ${result} True
\ No newline at end of file
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+*** Settings ***
+Documentation ORAN Reset - RAN to RIC Scenario 1
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+*** Settings ***
+Suite Setup Prepare Enviorment
+Resource ../Resource/resource.robot
+Resource ../Resource/Keywords.robot
+Library OperatingSystem
+Library Collections
+Library REST ${url}
+
+
+
+
+
+*** Test Cases ***
+
+Prepare Ran in Connected connectionStatus
+ Post Request setup node b x-2
+ Integer response status 200
+ Sleep 1s
+ GET /v1/nodeb/test1
+ Integer response status 200
+ String response body ranName test1
+ String response body connectionStatus CONNECTED
+
+Stop RNIB
+ Run docker stop redis
+
+Run Reset from RAN
+ Run ${Run_Config}
+ Sleep 1s
+
+Remove log files
+ Remove File ${EXECDIR}/gnb.log
+ Remove File ${EXECDIR}/e2mgr.log
+
+Save logs
+ Sleep 1s
+ Run ${Save_e2_log}
+ Run ${Save_e2mgr_log}
\ No newline at end of file
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+
+def verify(directory):
+
+ file = 'e2mgr.log'
+
+ path = '/'
+
+ file_path = directory + path + file
+
+ f = open(file_path,'r')
+
+ found_message_10070 = False
+ found_message_error = False
+
+ for l in f:
+ if l.find('MType: 10070') > 0 and l.find('Meid: \\"test1\\"') > 0:
+ found_message_10070 = True
+ elif l.find('RanName: test1') > 0 and l.find('Error:') > 0:
+ found_message_error = True
+ if found_message_10070 and found_message_error:
+ break
+
+ if found_message_10070 and found_message_error:
+ return True
+ else:
+ return False
+
+
+
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+
+*** Settings ***
+Library String
+Library OperatingSystem
+Library Process
+Library ${CURDIR}/Reset_Ran_To_Ric_RNIB_Down_Verify_logs.py
+Resource ../Resource/Keywords.robot
+
+
+
+*** Test Cases ***
+Verify logs - Reset Sent by simulator
+ ${Reset}= Grep File ./gnb.log ResetRequest has been sent
+ #Log to console ${Reset}
+ Should Be Equal ${Reset} gnbe2_simu: ResetRequest has been sent
+
+Verify logs - e2mgr logs
+ ${result} Reset_Ran_To_Ric_RNIB_Down_Verify_logs.verify ${EXECDIR}
+ log to console ${result}
+ Should Be Equal As Strings ${result} True
\ No newline at end of file
--- /dev/null
+##############################################################################
+#
+# Copyright (c) 2019 AT&T Intellectual Property.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##############################################################################
+
+*** Settings ***
+Documentation ORAN Reset - RAN to RIC Scenario 2
Library OperatingSystem
Library Collections
Library REST ${url}
+Suite Teardown Start E2
*** Variables ***
${stop_docker_e2} docker stop e2
Library OperatingSystem
+
+
+
*** Keywords ***
Post Request setup node b x-2
Set Headers ${header}
POST /v1/nodeb/x2-setup ${json}
+
Get Request node b enb test1
Sleep 1s
GET /v1/nodeb/test1
Sleep 1s
GET /v1/nodeb/test2
+
+
Post Request setup node b endc-setup
Set Headers ${header}
POST /v1/nodeb/endc-setup ${endcjson}
+Stop Simulator
+ Run And Return Rc And Output ${stop_simu}
+
Prepare Simulator For Load Information
Run And Return Rc And Output ${stop_simu}
${resetcausejson} {"cause": "misc:not-enough-user-plane-processing-resources"}
${header} {"Content-Type": "application/json"}
${docker_command} docker ps | grep 1.0 | wc --lines
-${run_simu_load} docker run -d --name gnbe2_simu --env gNBipv4=localhost --env gNBport=36422 --env duration=600000000000 --env indicationReportRate=1000000000 --env indicationInsertRate=0 -p 5577:36422/sctp snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/gnbe2_sim:1.0.5
+${run_simu_load} docker run -d --name gnbe2_simu --env gNBipv4=localhost --env gNBport=36422 --env duration=600000000000 --env indicationReportRate=1000000000 --env indicationInsertRate=0 -p 5577:36422/sctp snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/gnbe2_simu:1.0.6
${stop_simu} docker stop gnbe2_simu
-${run_simu_regular} docker run -d --name gnbe2_simu --env gNBipv4=localhost --env gNBport=36422 --env duration=600000000000 --env indicationReportRate=0 --env indicationInsertRate=0 -p 5577:36422/sctp snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/gnbe2_sim:1.0.5
+${run_simu_regular} docker run -d --name gnbe2_simu --env gNBipv4=localhost --env gNBport=36422 --env duration=600000000000 --env indicationReportRate=0 --env indicationInsertRate=0 -p 5577:36422/sctp snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/gnbe2_simu:1.0.6
${docker_Remove} docker rm gnbe2_simu
-${docker_cp} docker cp ../Resource/configuration.yaml e2mgr:/opt/E2Manager/resources/configuration.yaml
${docker_restart} docker restart e2mgr
${restart_simu} docker restart gnbe2_simu
${restart_e2adapter} docker restart e2adapter
${stop_docker_e2} docker stop e2
${start_redis} docker run -d --name redis -p 6379:6379 --env DBAAS_SERVICE_HOST=10.0.2.15 snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/dbass:1.0.0
${redis_remove} docker rm redis
+${restart_simu} docker restart gnbe2_simu
+${start_e2} docker start e2
+${stop_docker_e2} docker stop e2
+${Run_Config} docker exec gnbe2_simu pkill gnbe2_simu -INT
+${Save_e2_log} docker logs gnbe2_simu > gnb.log
+${Save_e2mgr_log} docker logs e2mgr > e2mgr.log
+
Integer response status 200
X2 - Get Nodeb
- Get Request node b enb test1
+ Get Request Node B Enb test1
Integer response status 200
String response body ranName test1
String response body ip 10.0.2.15