+++ /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 ***
-Resource ../Resource/resource.robot
-Resource ../Resource/Keywords.robot
-Library OperatingSystem
-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
- Post Request setup node b x-2
- Get Request node b enb test1
-
-
-Run Configuration update
- 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}
-
-
-
-
-
-
-
-
*** Test Cases ***
Run Endc setup request
Post Request setup node b endc-setup
- Integer response status 200
+ Integer response status 204
Get request gnb
Sleep 1s
*** Settings ***
Suite Setup Prepare Enviorment
-Library Process
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
*** Test Cases ***
Run x2 setup
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 2s
GET /v1/nodeb/test1
Integer response status 200
Run endc setup
Post Request setup node b endc-setup
- Integer response status 200
+ Integer response status 204
Sleep 2s
GET /v1/nodeb/test2
Integer response status 200
+++ /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.
-#
-##############################################################################
-
-import config
-import redis
-
-
-def flush():
-
- c = config.redis_ip_address
-
- p = config.redis_ip_port
-
- r = redis.Redis(host=c, port=p, db=0)
-
- r.flushall()
-
- return True
-
-
-def add():
-
- c = config.redis_ip_address
-
- p = config.redis_ip_port
-
- r = redis.Redis(host=c, port=p, db=0)
-
- r.flushall()
-
- r.set("{e2Manager},ENB:02f829:007a80", "\n\x05test1\x12\t10.0.2.15\x18\xc9+ \x01*\x10\n\x0602f829\x12\x06007a800\x01:3\b\x01\x12/\bc\x12\x0f02f829:0007ab50\x1a\x040102\"\x0602f829*\n\n\b\b\x01\x10\x01\x18\x04 \x040\x01")
-
- r.set("{e2Manager},RAN:test1","\x12\t10.0.2.15\x18\xc9+ \x03H\x01R\x02\b\t")
-
- r.set("{e2Manager},PCI:test1:63" , "\b\x01\x12/\bc\x12\x0f02f829:0007ab50\x1a\x040102\"\x0602f829*\n\n\b\b\x01\x10\x01\x18\x04 \x040\x01")
-
- r.set("{e2Manager},CELL:02f829:0007ab50" , "\b\x01\x12/\bc\x12\x0f02f829:0007ab50\x1a\x040102\"\x0602f829*\n\n\b\b\x01\x10\x01\x18\x04 \x040\x01")
-
- r.sadd("{e2Manager},ENB" , "\n\x05test1\x12\x10\n\x0602f829\x12\x06007a80")
-
-
- r.set("{e2Manager},GNB:03f829:002234", "\n\x05test2\x12\t10.0.2.16\x18\xc9+ \x01*\x10\n\x0702f829\x12\x070012340\x02BI\nG\nE\bc\x12\x1102f829:0008ab0120*\x0602f8290\x01:$\n\"\n\t\bd\"\x05\b\t\x12\x01\t\x12\t\bd\"\x05\b\t\x12\x01\t\x1a\x04\b\x01\x10\x01\"\x04\b\x01\x10\x01")
-
- r.set("{e2Manager},RAN:test2", "\n\x05test2\x12\t10.0.2.15\x18\xc9+ \x01*\x10\n\x0702f829\x12\x070012340\x03BI\nG\nE\bc\x12\x1103f829:0008ab0120*\x0602f8290\x01:$\n\"\n\t\bd\"\x05\b\t\x12\x01\t\x12\t\bd\"\x05\b\t\x12\x01\t\x1a\x04\b\x01\x10\x01\"\x04\b\x01\x10\x01")
-
- r.set("{e2Manager},PCI:test2:63", "\b\x02\x1aG\nE\bc\x12\x1102f829:0008ab0120*\x0702f8290\x01:$\n\"\n\t\bd\"\x05\b\t\x12\x01\t\x12\t\bd\"\x05\b\t\x12\x01\t\x1a\x04\b\x01\x10\x01\"\x04\b\x01\x10\x01")
-
- r.set("{e2Manager},NRCELL:02f829:0007ab0120", "\b\x02\x1aG\nE\bc\x12\x1102f829:0007ab0120*\x0602f8290\x01:$\n\"\n\t\bd\"\x05\b\t\x12\x01\t\x12\t\bd\"\x05\b\t\x12\x01\t\x1a\x04\b\x01\x10\x01\"\x04\b\x01\x10\x01")
-
- r.sadd("{e2Manager},GNB","\n\x05test2\x12\x10\n\x0603f829\x12\x06001234")
-
- return True
Trigger X-2 Setup for load information
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
Trigger X-2 Setup for load information
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
Prepare Ran in Connecting connectionStatus
Sleep 1s
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
repare Ran in Connected connectionStatus
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
+++ /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}
-Suite Teardown Start E2
-
-
-
-*** Test Cases ***
-
-Pre Condition for Connecting - no E2
- Run And Return Rc And Output ${stop_docker_e2}
- ${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
-
-Disconnect Ran
- PUT /v1/nodeb/shutdown
- Integer response status 500
-
-
-Verfiy Shutdown ConnectionStatus
- Sleep 1s
- GET /v1/nodeb/test1
- Integer response status 200
- String response body ranName test1
- String response body connectionStatus SHUTTING_DOWN
-
Prepare Ran in Connecting connectionStatus
Post Request setup node b endc-setup
- Integer response status 200
+ Integer response status 204
Sleep 1s
- GET /v1/nodeb/test1
+ GET /v1/nodeb/test2
Integer response status 200
String response body ranName test2
String response body connectionStatus DISCONNECTED
Verfiy Shutdown ConnectionStatus
Sleep 1s
- GET /v1/nodeb/test1
+ GET /v1/nodeb/test2
Integer response status 200
String response body ranName test2
String response body connectionStatus SHUT_DOWN
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
Library Process
Library ${CURDIR}/Reset_Ran_To_Ric_RNIB_Down_Verify_logs.py
Resource ../Resource/Keywords.robot
+Test Teardown Start Redis with 4 dockers
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
+ Should Be Equal As Strings ${result} True
+
+
+*** Keywords ***
+Start Redis with 4 dockers
+ Run And Return Rc And Output ${redis_remove}
+ Run And Return Rc And Output ${start_redis}
+ ${result}= Run And Return Rc And Output ${docker_command}
+ Should Be Equal As Integers ${result[1]} 4
+ Sleep 5s
##############################################################################
*** Settings ***
-Suite Setup Prepare Enviorment
+Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
*** Test Cases ***
-
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
##############################################################################
*** Settings ***
-Suite Setup Prepare Enviorment
+Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
*** Test Cases ***
-
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
String response body connectionStatus CONNECTED
-Send Reset reqeust with no cause
+Send Reset reqeust with cause
Set Headers ${header}
PUT /v1/nodeb/test1/reset ${resetcausejson}
Integer response status 204
\ No newline at end of file
#
##############################################################################
*** Settings ***
-Suite Setup Prepare Enviorment
+Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library REST ${url}
Suite Teardown Start E2
-*** Variables ***
-${stop_docker_e2} docker stop e2
-
-
-
*** Test Cases ***
Pre Condition for Connecting - no E2
Prepare Ran in Connecting connectionStatus
Sleep 1s
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
Run And Return Rc And Output ${docker_Remove}
Run And Return Rc And Output ${run_simu_regular}
Run And Return Rc And Output ${restart_e2adapter}
+ Sleep 2s
${result}= Run And Return Rc And Output ${docker_command}
+ log to console ${result}
Should Be Equal As Integers ${result[1]} 5
Start E2
+++ /dev/null
-logging:
- logLevel: info
-http:
- port: 3800
-rmr:
- port: 3801
- maxMsgSize: 4096
-notificationResponseBuffer: 100
-bigRedButtonTimeoutSec: 5
-maxConnectionAttempts: 300
${endcjson} {"ranIp": "10.0.2.15","ranPort": 49999,"ranName":"test2"}
${resetcausejson} {"cause": "misc:not-enough-user-plane-processing-resources"}
${header} {"Content-Type": "application/json"}
-${docker_command} docker ps | grep 1.0 | wc --lines
+${docker_command} docker ps | grep Up | 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_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_simu:1.0.6
*** Test Cases ***
X2 - Setup Test
Post Request setup node b x-2
- Integer response status 200
+ Integer response status 204
X2 - Get Nodeb
Get Request Node B Enb test1