First commit

This commit is contained in:
Leonardo Bonati
2021-12-08 20:17:46 +00:00
commit 60dffad583
2923 changed files with 463894 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
FROM python:3.6
RUN python3 -m pip install robotframework \
&& pip install --upgrade RESTinstance \
&& pip install docker \
&& pip install -U robotframework-requests\
&& apt-get update
WORKDIR /opt
COPY ./Scripts /opt/Scripts
COPY ./Tests /opt/Tests
COPY ./run_tests.sh /opt/run_tests.sh
ENV DOCKER_HOST_IP "127.0.0.1"
CMD [ "/opt/run_tests.sh" ]

View File

@@ -0,0 +1,55 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
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 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
String response body ranName test1
String response body connectionStatus CONNECTING
Send Reset reqeust with no cause
Set Headers ${header}
PUT /v1/nodeb/test1/reset ${resetcausejson}
Integer response status 400
Integer response body errorCode 403

View File

@@ -0,0 +1,62 @@
#!/bin/bash
MS=$1
ACTION=$2
do_stop(){
MS=$1
if ! docker ps --filter "name=^/${MS}" | grep -q "${MS}"; then
echo "${MS} is already stopped, ignore the action."
else
echo "Executing 'docker stop ${MS}'"
docker stop ${MS}
fi
}
do_start(){
MS=$1
if docker ps --filter "name=^/${MS}" | grep -q "${MS}"; then
echo "${MS} is running, performing restart."
echo "Executing \'\docker stop ${MS}'"
docker stop ${MS} && sleep 2
echo "Executing 'docker start ${MS}'"
docker start ${MS}
else
echo "Executing 'docker start ${MS}'"
docker start ${MS}
fi
}
do_status(){
MS=$1
out=$(docker ps --filter "name=^/${MS}" | grep "${MS}")
res=$?
if [ "$res" == "0" ]; then
echo $out
echo "The ${MS} is currnetly up & running!"
else
echo "The ${MS} is currnetly not running!"
fi
}
case $ACTION in
start)
do_start ${MS}
;;
stop)
do_stop ${MS}
;;
status)
do_status ${MS}
;;
restart)
do_stop ${MS}
do_start ${MS}
;;
*)
do_status ${MS}
;;
esac

View File

@@ -0,0 +1,43 @@
#!/usr/bin/env python
import sys, os, traceback
import docker
# Getting the Arguments. if argument are missing exit the script with exit 1
try:
ms = sys.argv[1].lower()
action = sys.argv[2].lower()
script = os.path.basename(sys.argv[0])
except:
print("Usage: %s <microservice> <action> for now only stop action is allowd" % \
(os.path.basename(sys.argv[0])))
sys.exit(1)
ms=sys.argv[1].lower()
action=sys.argv[2].lower()
docker_host_ip=os.environ.get('DOCKER_HOST_IP', False)
cms=[]
if not docker_host_ip:
print('The DOCKER_HOST_IP env varibale is not defined, exiting!')
sys.exit(1)
def get_ms():
try:
client = docker.DockerClient(base_url='tcp://%s:2376' % docker_host_ip)
for ms in client.containers.list():
if ms.name == sys.argv[1]:
cms.append(ms)
return cms[0]
except:
print('Can\'t connect to docker API, Exiting!')
print(traceback.format_exc())
sys.exit(1)
if action == 'stop':
print('Stop the %s pod' % ms )
get_ms().stop()
sys.exit(0)
else:
print ('Only stop commnad is allowed!, exiting!')
sys.exit(1)

View File

@@ -0,0 +1,29 @@
#!/bin/bash
stringContain() { [ -z "${2##*$1*}" ]; }
MS=${1}
ACTION=${2}
SCRIPT=`basename "$0"`
USAGE="\nUsage: ./$SCRIPT <MS NAME> <ACTION>\nValid Options: ./$SCRIPT <simu,dbass,e2mgr,e2> <stop,start,restart,status>\nE.g ./$SCRIPT dbass stop"
OPTIONS="simu,dbass,e2mgr,e2,stop,start,restart,status"
DOC_SCRIPT="/opt/docker_ms.sh"
K8S_SCRIPT="/opt/k8s_ms.py"
# Check if script got the reqiured arguments
[ -z ${SYS_TYPE} ] && echo -e "\nThe SYS_TYPE environemnt variable is not set!" && echo -e "${USAGE}" && exit 1
[ -z ${MS} ] && echo -e "\nThe MS argument is reqiured!" && echo -e "${USAGE}" && exit 2
[ -z ${ACTION} ] && echo -e "\nThe ACTION argument is reqiured!" && echo -e "${USAGE}" && exit 2
! grep -q $MS <<<"$OPTIONS" && echo -e "\nThe microservice '${MS}' is not a valid value!" && echo -e "${USAGE}" && exit 3
! grep -q $ACTION <<<"$OPTIONS" && echo -e "\nThe action '${ACTION}' is not a valid value!" && echo -e "${USAGE}" && exit 3
if [ "${SYS_TYPE}" == "docker" ]; then
echo "SYS_TYPE=docker, Docker mode is set"
[ ! -f ${DOC_SCRIPT} ] && echo "reqiured file '${DOC_SCRIPT}' is missing, exit" && exit 4
echo "Executing the '${DOC_SCRIPT}' script!"
${DOC_SCRIPT} ${MS} ${ACTION}
elif [ "${SYS_TYPE}" == "k8s" ]; then
echo "SYS_TYPE=k8s, K8S mode is set"
[ ! -f ${K8S_SCRIPT} ] && echo "reqiured file '${K8S_SCRIPT}' is missing, exit" && exit 4
echo "Executing the '${K8S_SCRIPT}' script!"
${K8S_SCRIPT} ${MS} ${ACTION}
fi

View File

@@ -0,0 +1,66 @@
#!/bin/bash
COMP="${1:-all}"
E2M_TAG="${2:-2.0.6}"
E2T_TAG="${3:-2.0.6}"
SIM_TAG="${4:-1.0.6}"
E2ADAPTER_TAG="${5:-1.3.2}"
if [ "$COMP" == "all" ]; then
docker rm -f e2
docker rm -f e2mgr
docker rm -f gnbe2_simu
docker rm -f e2adapter
docker rm -f dbass
docker ps
sleep 2
#docker pull nexus3.o-ran-sc.org:10004/ric-plt-e2:$E2T_TAG
#docker pull nexus3.o-ran-sc.org:10004/ric-plt-e2mgr:$E2M_TAG
docker pull snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2:$E2T_TAG
docker pull snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2mgr:$E2M_TAG
docker pull snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/gnbe2_simu:$SIM_TAG
docker pull snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2adapter:$E2ADAPTER_TAG
docker pull snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/dbass:1.0.0
docker run -d --name dbass -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
#docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env DBAAS_SERVICE_HOST=10.0.2.15 --env RMR_VCTL_FILE=/tmp/rmr.verbose nexus3.o-ran-sc.org:10004/ric-plt-e2mgr:$E2M_TAG
docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env DBAAS_SERVICE_HOST=10.0.2.15 --env RMR_VCTL_FILE=/tmp/rmr.verbose snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2mgr:$E2M_TAG
#docker cp e2mgr:/opt/E2Manager/router.txt .
sleep 2
#docker create --name e2 --env sctp=5577 --env nano=38000 --env loglevel=debug --env print=1 -p 38000:38000 nexus3.o-ran-sc.org:10004/ric-plt-e2:$E2T_TAG
docker create --name e2 --env sctp=5577 --env nano=38000 --env loglevel=debug --env print=1 -p 38000:38000 snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2:$E2T_TAG
sleep 2
#docker cp router.txt e2:/opt/e2/dockerRouter.txt
sleep 2
docker start e2
docker run -d --name gnbe2_simu --env gNBipv4=localhost --env gNBport=36422 --env indicationReportRate=0 --env indicationInsertRate=0 -p 5577:36422/sctp snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/gnbe2_simu:$SIM_TAG
docker run -d -v /etc/e2adapter:/etc/e2adapter -v /var/log/e2adapter:/var/log/e2adapter --network host --name e2adapter snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2adapter:$E2ADAPTER_TAG
docker ps
fi
if [ "$COMP" = "gnbe2_sim" ]; then
docker rm -f gnb_simu
docker run -d --name gnbe2_simu --env gNBipv4=localhost --env gNBport=36422 indicationReportRate=0 --env indicationInsertRate=0 -p 5577:36422/sctp snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/gnbe2_simu:$SIM_TAG
docker ps
fi
if [ "$COMP" = "e2" ]; then
docker rm -f e2
#docker pull nexus3.o-ran-sc.org:10004/ric-plt-e2:$E2T_TAG
docker pull snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2:$E2T_TAG
docker create --name e2 --env sctp=5577 --env nano=38000 --env print=1 --env RMR_RTG_SVC=10.0.2.15 -p 38000:38000 snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2:$E2T_TAG
docker ps
fi
if [ "$COMP" = "e2mgr" ]; then
docker rm -f e2mgr
#docker pull nexus3.o-ran-sc.org:10004/ric-plt-e2mgr:$E2M_TAG
docker pull snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2mgr:$E2M_TAG
#docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env RMR_RTG_SVC=10.0.2.15 --env DBAAS_SERVICE_HOST=10.0.2.15 nexus3.o-ran-sc.org:10004/ric-plt-e2mgr:$E2M_TAG
docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env RMR_RTG_SVC=10.0.2.15 --env DBAAS_SERVICE_HOST=10.0.2.15 snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2mgr:$E2M_TAG
docker ps
fi

View File

@@ -0,0 +1,35 @@
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Resource ../Resource/scripts_variables.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library ../Scripts/cleanup_db.py
Library ../Scripts/e2t_db_script.py
*** Test Cases ***
Test New E2T Send Init
Stop E2
${result}= cleanup_db.flush
Should Be Equal As Strings ${result} True
Start E2
prepare logs for tests
Remove log files
Save logs
E2M Logs - Verify RMR Message
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${E2_INIT_message_type} ${None}
Should Be Equal As Strings ${result} True
Verify E2T keys in DB
${result}= e2t_db_script.verify_e2t_addresses_key
Should Be Equal As Strings ${result} True
${result}= e2t_db_script.verify_e2t_instance_key
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,20 @@
##############################################################################
#
# 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 E2Term-Initialization

View File

@@ -0,0 +1,50 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Get all node ids
GET v1/nodeb/ids
Sleep 2s
Integer response status 200
String response body 0 inventoryName ${ranName}
String response body 0 globalNbId plmnId 02F829
String response body 0 globalNbId nbId 001100000011000000110000

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation Get all nodes

View File

@@ -0,0 +1,59 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Library Process
Library ../Scripts/getnodes.py
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Add nodes to redis db
${result} getnodes.add
Should Be Equal As Strings ${result} True
Get all node ids
GET v1/nodeb/ids
Integer response status 200
String response body 0 inventoryName test1
String response body 0 globalNbId plmnId 02f829
String response body 0 globalNbId nbId 007a80
String response body 1 inventoryName test2
String response body 1 globalNbId plmnId 03f829
String response body 1 globalNbId nbId 001234

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation Get all nodes

View File

@@ -0,0 +1,58 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Resource ../Resource/scripts_variables.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
Library REST ${url}
*** Test Cases ***
Get request gnb
Sleep 2s
Get Request node b gnb
Integer response status 200
String response body ranName ${ranname}
String response body connectionStatus CONNECTED
String response body nodeType GNB
String response body associatedE2tInstanceAddress ${e2tinstanceaddress}
Integer response body gnb ranFunctions 0 ranFunctionId 1
Integer response body gnb ranFunctions 0 ranFunctionRevision 1
Integer response body gnb ranFunctions 1 ranFunctionId 2
Integer response body gnb ranFunctions 1 ranFunctionRevision 1
Integer response body gnb ranFunctions 2 ranFunctionId 3
Integer response body gnb ranFunctions 2 ranFunctionRevision 1

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation GetNodeb-GNB

View File

@@ -0,0 +1,53 @@
##############################################################################
#
# 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/Keywords.robot
Resource ../Resource/resource.robot
Resource ../Resource/scripts_variables.robot
Library REST ${url}
Library RequestsLibrary
Library Collections
Library OperatingSystem
Library json
Library ../Scripts/e2mdbscripts.py
*** Test Cases ***
Get E2T instances
${result} e2mdbscripts.populate_e2t_instances_in_e2m_db_for_get_e2t_instances_tc
Create Session getE2tInstances ${url}
${headers}= Create Dictionary Accept=application/json
${resp}= Get Request getE2tInstances /v1/e2t/list headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.content} [{"e2tAddress":"e2t.att.com:38000","ranNames":["test1","test2","test3"]},{"e2tAddress":"e2t.att.com:38001","ranNames":[]}]
${flush} cleanup_db.flush

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation ORAN health check

View File

@@ -0,0 +1,37 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Get Health
GET /v1/health
Integer response status 200

View File

@@ -0,0 +1,40 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library OperatingSystem
Library REST ${url}
Suite Teardown Start Dbass
*** Test Cases ***
Get Health Unhappy - Dbass down
Stop Dbass
GET /v1/health
Integer response status 500

View File

@@ -0,0 +1,20 @@
##############################################################################
#
# 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 Keep Alive

View File

@@ -0,0 +1,81 @@
robot##############################################################################
#
# 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
Resource ../Resource/scripts_variables.robot
Library ../Scripts/find_error_script.py
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
Library ../Scripts/e2mdbscripts.py
Library OperatingSystem
Library Collections
Library REST ${url}
*** Test Cases ***
Get request gnb
Sleep 2s
Get Request node b gnb
Integer response status 200
String response body ranName ${ranname}
String response body connectionStatus CONNECTED
String response body nodeType GNB
String response body associatedE2tInstanceAddress ${e2tinstanceaddress}
Integer response body gnb ranFunctions 0 ranFunctionId 1
Integer response body gnb ranFunctions 0 ranFunctionRevision 1
Integer response body gnb ranFunctions 1 ranFunctionId 2
Integer response body gnb ranFunctions 1 ranFunctionRevision 1
Integer response body gnb ranFunctions 2 ranFunctionId 3
Integer response body gnb ranFunctions 2 ranFunctionRevision 1
prepare logs for tests
Remove log files
Save logs
Verify RAN is associated with E2T instance
${result} e2mdbscripts.verify_ran_is_associated_with_e2t_instance ${ranname} ${e2tinstanceaddress}
Should Be True ${result}
Stop E2T
Stop E2
Sleep 3s
Prepare logs
Remove log files
Save logs
Verify RAN is not associated with E2T instance
Get Request node b gnb
Integer response status 200
String response body ranName ${ranname}
Missing response body associatedE2tInstanceAddress
String response body connectionStatus DISCONNECTED
Verify E2T instance removed from db
${result} e2mdbscripts.verify_e2t_instance_key_exists ${e2tinstanceaddress}
Should Be True ${result} == False
${result} e2mdbscripts.verify_e2t_instance_exists_in_addresses ${e2tinstanceaddress}
Should Be True ${result} == False
Start E2T
Start E2

View File

@@ -0,0 +1,59 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library ../Scripts/e2mdbscripts.py
Library OperatingSystem
Library Collections
Library REST ${url}
*** Test Cases ***
prepare logs for tests
Remove log files
Save logs
Setup Ran and verify it's CONNECTED and associated
Get Request node b gnb
Integer response status 200
String response body ranName ${ranname}
String response body connectionStatus CONNECTED
String response body associatedE2tInstanceAddress ${e2tinstanceaddress}
Stop simulator
Stop Simulator
Verify connection status is DISCONNECTED and RAN is not associated with E2T instance
Sleep 2s
GET ${getNodeb}
Integer response status 200
String response body ranName ${ranname}
Missing response body associatedE2tInstanceAddress
String response body connectionStatus DISCONNECTED
Verify E2T instance is NOT associated with RAN
${result} e2mdbscripts.verify_ran_is_associated_with_e2t_instance ${ranname} ${e2tinstanceaddress}
Should Be True ${result} == False

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation ORAN Lost Connection scenarios

View File

@@ -0,0 +1,46 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Resource red_button_keywords.robot
Library OperatingSystem
Library Collections
Library REST ${url}
*** Test Cases ***
Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t instance
Verify connected and associated
Execute Shutdown
Execute Shutdown
Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
Verify shutdown for gnb
Verify E2T instance has no associated RANs
Verify E2T instance has no associated RANs

View File

@@ -0,0 +1,48 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Resource red_button_keywords.robot
Library OperatingSystem
Library Collections
Library REST ${url}
*** Test Cases ***
Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t instance
Verify connected and associated
Execute Shutdown
Execute Shutdown
Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
Verify shutdown for gnb
Verify E2T instance has no associated RANs
Restart simulator
Restart simulator
Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t instance
Verify connected and associated

View File

@@ -0,0 +1,53 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Resource red_button_keywords.robot
Library OperatingSystem
Library Collections
Library REST ${url}
*** Test Cases ***
Verify nodeb connection status is CONNECTED and it's associated to an e2t instance
Verify connected and associated
Execute Shutdown
Execute Shutdown
Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
Verify shutdown for gnb
Verify E2T instance has no associated RANs
Verify E2T instance has no associated RANs
Execute second Shutdown
Execute Shutdown
Verify again nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
Verify shutdown for gnb
Verify again E2T instance has no associated RANs
Verify E2T instance has no associated RANs

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation ORAN Red Button Scenarios

View File

@@ -0,0 +1,55 @@
##############################################################################
#
# 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 Keywords file
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library ../Scripts/e2mdbscripts.py
Library Collections
Library OperatingSystem
Library json
Library REST ${url}
*** Keywords ***
Verify connected and associated
Get Request node b gnb
Integer response status 200
String response body ranName ${ranName}
String response body connectionStatus CONNECTED
String response body associatedE2tInstanceAddress ${e2tinstanceaddress}
Verify shutdown for gnb
Get Request node b gnb
Integer response status 200
String response body ranName ${ranName}
String response body connectionStatus SHUT_DOWN
Missing response body associatedE2tInstanceAddress
Verify E2T instance has no associated RANs
${result} e2mdbscripts.verify_e2t_instance_has_no_associated_rans ${e2tinstanceaddress}
Should Be True ${result}
Execute Shutdown
PUT /v1/nodeb/shutdown
Integer response status 204

View File

@@ -0,0 +1,128 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation Keywords file
Library ../Scripts/cleanup_db.py
Resource ../Resource/resource.robot
Library OperatingSystem
*** Keywords ***
Get Request node b gnb
Sleep 1s
GET ${getNodeb}
Update Ran request
Sleep 1s
PUT ${update_gnb_url} ${update_gnb_body}
Update Ran request not valid
Sleep 1s
PUT ${update_gnb_url} ${update_gnb_body_notvalid}
Remove log files
Remove File ${EXECDIR}/${gnb_log_filename}
Remove File ${EXECDIR}/${e2mgr_log_filename}
Remove File ${EXECDIR}/${e2t_log_filename}
Remove File ${EXECDIR}/${rm_sim_log_filename}
Save logs
Sleep 1s
Run ${Save_sim_log}
Run ${Save_e2mgr_log}
Run ${Save_e2t_log}
Run ${Save_rm_sim_log}
Stop Simulator
Run And Return Rc And Output ${stop_simu}
Prepare Enviorment
Log To Console Starting preparations
${starting_timestamp} Evaluate datetime.datetime.now(datetime.timezone.utc).isoformat("T") modules=datetime
${e2t_log_filename} Evaluate "e2t.${SUITE NAME}.log".replace(" ","-")
${e2mgr_log_filename} Evaluate "e2mgr.${SUITE NAME}.log".replace(" ","-")
${gnb_log_filename} Evaluate "gnb.${SUITE NAME}.log".replace(" ","-")
${rm_sim_log_filename} Evaluate "rm_sim.${SUITE NAME}.log".replace(" ","-")
${Save_sim_log} Evaluate 'docker logs --since ${starting_timestamp} gnbe2_oran_simu > ${gnb_log_filename}'
${Save_e2mgr_log} Evaluate 'docker logs --since ${starting_timestamp} e2mgr > ${e2mgr_log_filename}'
${Save_e2t_log} Evaluate 'docker logs --since ${starting_timestamp} e2 > ${e2t_log_filename}'
${Save_rm_sim_log} Evaluate 'docker logs --since ${starting_timestamp} rm_sim > ${rm_sim_log_filename}'
Set Suite Variable ${e2t_log_filename}
Set Suite Variable ${e2mgr_log_filename}
Set Suite Variable ${gnb_log_filename}
Set Suite Variable ${rm_sim_log_filename}
Set Suite Variable ${Save_sim_log}
Set Suite Variable ${Save_e2mgr_log}
Set Suite Variable ${Save_e2t_log}
Set Suite Variable ${Save_rm_sim_log}
Log To Console Ready to flush db
${flush} cleanup_db.flush
Should Be Equal As Strings ${flush} True
Run And Return Rc And Output ${stop_simu}
Run And Return Rc And Output ${docker_Remove}
Run And Return Rc And Output ${run_simu_regular}
Sleep 3s
Log To Console Validating dockers are up
${result}= Run And Return Rc And Output ${docker_command}
Should Be Equal As Integers ${result[1]} ${docker_number}
Start E2
Run And Return Rc And Output ${start_e2}
${result}= Run And Return Rc And Output ${docker_command}
Should Be Equal As Integers ${result[1]} ${docker_number}
Sleep 2s
Stop E2
Run And Return Rc And Output ${stop_e2}
${result}= Run And Return Rc And Output ${docker_command}
Should Be Equal As Integers ${result[1]} ${docker_number-1}
Sleep 2s
Start Dbass
Run And Return Rc And Output ${dbass_remove}
Run And Return Rc And Output ${dbass_start}
${result}= Run And Return Rc And Output ${docker_command}
Should Be Equal As Integers ${result[1]} ${docker_number}
Stop Dbass
Run And Return Rc And Output ${dbass_stop}
${result}= Run And Return Rc And Output ${docker_command}
Should Be Equal As Integers ${result[1]} ${docker_number-1}
Restart simulator
Run And Return Rc And Output ${restart_simu}
${result}= Run And Return Rc And Output ${docker_command}
Should Be Equal As Integers ${result[1]} ${docker_number}
Start RoutingManager Simulator
Run And Return Rc And Output ${start_routingmanager_sim}
Stop RoutingManager Simulator
Run And Return Rc And Output ${stop_routingmanager_sim}
Restart simulator with less docker
Run And Return Rc And Output ${restart_simu}
${result}= Run And Return Rc And Output ${docker_command}
Should Be Equal As Integers ${result[1]} ${docker_number-1}

View File

@@ -0,0 +1,55 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation Resource file
*** Variables ***
${docker_number} 5
${docker_number-1} 4
${url} http://localhost:3800
${ranName} gnb:208-092-303030
${getNodeb} /v1/nodeb/${ranName}
${update_gnb_url} /v1/nodeb/${ranName}/update
${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}]}]}
${E2tInstanceAddress} 10.0.2.15:38000
${header} {"Content-Type": "application/json"}
${docker_command} docker ps | grep Up | wc --lines
${stop_simu} docker stop gnbe2_oran_simu
${run_simu_regular} docker run -d --name gnbe2_oran_simu --net host --env gNBipv4=10.0.2.15 --env gNBport=5577 --env ricIpv4=10.0.2.15 --env ricPort=36422 --env nbue=0 snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/gnbe2_oran_simu:3.2-32
${docker_Remove} docker rm gnbe2_oran_simu
${docker_restart} docker restart e2mgr
${restart_simu} docker restart gnbe2_oran_simu
${start_e2} docker start e2
${stop_e2} docker stop e2
${dbass_start} docker run -d --name dbass -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
${dbass_remove} docker rm dbass
${dbass_stop} docker stop dbass
${restart_simu} docker restart gnbe2_oran_simu
${stop_docker_e2} docker stop e2
${stop_routingmanager_sim} docker stop rm_sim
${start_routingmanager_sim} docker start rm_sim

View File

@@ -0,0 +1,36 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation Message types resource file
*** Variables ***
${E2_INIT_message_type} MType: 1100
${Setup_failure_message_type} MType: 12003
${first_retry_to_retrieve_from_db} RnibDataService.retry - retrying 1 GetNodeb
${third_retry_to_retrieve_from_db} RnibDataService.retry - after 3 attempts of GetNodeb
${RIC_RES_STATUS_REQ_message_type_successfully_sent} Message type: 10090 - Successfully sent RMR message
${E2_TERM_KEEP_ALIVE_REQ_message_type_successfully_sent} Message type: 1101 - Successfully sent RMR message

View File

@@ -0,0 +1,45 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
import config
import redis
import time
def flush():
c = config.redis_ip_address
p = config.redis_ip_port
r = redis.Redis(host=c, port=p, db=0)
r.flushall()
r.set("{e2Manager},E2TAddresses", "[\"10.0.2.15:38000\"]")
r.set("{e2Manager},E2TInstance:10.0.2.15:38000","{\"address\":\"10.0.2.15:38000\",\"associatedRanList\":[],\"keepAliveTimestamp\":" + str(int((time.time()+2) * 1000000000)) + ",\"state\":\"ACTIVE\",\"deletionTimeStamp\":0}")
return True

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
redis_ip_address = 'localhost'
redis_ip_port = 6379

View File

@@ -0,0 +1,73 @@
##############################################################################
#
# 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
import cleanup_db
import json
def getRedisClientDecodeResponse():
c = config.redis_ip_address
p = config.redis_ip_port
return redis.Redis(host=c, port=p, db=0, decode_responses=True)
def verify_ran_is_associated_with_e2t_instance(ranName, e2tAddress):
r = getRedisClientDecodeResponse()
e2tInstanceJson = r.get("{e2Manager},E2TInstance:"+e2tAddress)
e2tInstanceDic = json.loads(e2tInstanceJson)
assocRanList = e2tInstanceDic.get("associatedRanList")
return ranName in assocRanList
def verify_e2t_instance_has_no_associated_rans(e2tAddress):
r = getRedisClientDecodeResponse()
e2tInstanceJson = r.get("{e2Manager},E2TInstance:"+e2tAddress)
e2tInstanceDic = json.loads(e2tInstanceJson)
assocRanList = e2tInstanceDic.get("associatedRanList")
return not assocRanList
def verify_e2t_instance_exists_in_addresses(e2tAddress):
r = getRedisClientDecodeResponse()
e2tAddressesJson = r.get("{e2Manager},E2TAddresses")
e2tAddresses = json.loads(e2tAddressesJson)
return e2tAddress in e2tAddresses
def verify_e2t_instance_key_exists(e2tAddress):
r = getRedisClientDecodeResponse()
return r.exists("{e2Manager},E2TInstance:"+e2tAddress)
def populate_e2t_instances_in_e2m_db_for_get_e2t_instances_tc():
r = getRedisClientDecodeResponse()
r.set("{e2Manager},E2TAddresses", "[\"e2t.att.com:38000\",\"e2t.att.com:38001\"]")
r.set("{e2Manager},E2TInstance:e2t.att.com:38000", "{\"address\":\"e2t.att.com:38000\",\"associatedRanList\":[\"test1\",\"test2\",\"test3\"],\"keepAliveTimestamp\":1577619310484022369,\"state\":\"ACTIVE\"}")
r.set("{e2Manager},E2TInstance:e2t.att.com:38001", "{\"address\":\"e2t.att.com:38001\",\"associatedRanList\":[],\"keepAliveTimestamp\":1577619310484022369,\"state\":\"ACTIVE\"}")
return True
# def dissociate_ran_from_e2tInstance(ranName, e2tAddress):
# r = getRedisClientDecodeResponse()
# e2tInstanceJson = r.get("{e2Manager},E2TInstance:"+e2tAddress)
# e2tInstanceDic = json.loads(e2tInstanceJson)
# assocRanList = e2tInstanceDic.get("associatedRanList")
# print(assocRanList)
# assocRanList.remove(ranName)
# updatedE2tInstanceJson = json.dumps(e2tInstanceDic)
# print(updatedE2tInstanceJson)
# r.set("{e2Manager},E2TInstance:"+e2tAddress, updatedE2tInstanceJson)
# nodebBytes = r.get("{e2Manager},RAN:"+ranName)
# encoded = nodebBytes.decode().replace(e2tAddress,"").encode()
# r.set("{e2Manager},RAN:"+ranName, encoded)

View File

@@ -0,0 +1,58 @@
##############################################################################
#
# 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 getRedisClientDecodeResponse():
c = config.redis_ip_address
p = config.redis_ip_port
return redis.Redis(host=c, port=p, db=0, decode_responses=True)
def verify_e2t_addresses_key():
r = getRedisClientDecodeResponse()
value = "[\"10.0.2.15:38000\"]"
return r.get("{e2Manager},E2TAddresses") == value
def verify_e2t_instance_key():
r = getRedisClientDecodeResponse()
e2_address = "\"address\":\"10.0.2.15:38000\""
e2_associated_ran_list = "\"associatedRanList\":[]"
e2_state = "\"state\":\"ACTIVE\""
e2_db_instance = r.get("{e2Manager},E2TInstance:10.0.2.15:38000")
if e2_db_instance.find(e2_address) < 0:
return False
if e2_db_instance.find(e2_associated_ran_list) < 0:
return False
if e2_db_instance.find(e2_state) < 0:
return False
return True

View File

@@ -0,0 +1,40 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
def find_error(directory,filename, message):
path = '/'
file_path = directory + path + filename
f = open(file_path, 'r')
for l in f:
if l.find(message) > 0:
return True
return False

View File

@@ -0,0 +1,43 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
def verify_logs(directory,filename,mtype,meid):
path = '/'
file_path = directory + path + filename
f = open(file_path, 'r')
for l in f:
if (meid is not None):
if l.find(mtype) > 0 and l.find(meid) > 0:
return True
else:
if l.find(mtype) > 0:
return True
return False

View File

@@ -0,0 +1,59 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
import config
import redis
import cleanup_db
def add():
c = config.redis_ip_address
p = config.redis_ip_port
r = redis.Redis(host=c, port=p, db=0)
cleanup_db.flush()
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

View File

@@ -0,0 +1,68 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
import redis
import config
def getRedisClient():
c = config.redis_ip_address
p = config.redis_ip_port
return redis.Redis(host=c, port=p, db=0)
def verify_value():
r = getRedisClient()
value = "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00"
if r.get("{e2Manager},LOAD:test1") != value:
return True
else:
return False
def add():
r = getRedisClient()
r.set("{e2Manager},LOAD:test1", "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00")
if r.exists("{e2Manager},LOAD:test1"):
return True
else:
return False
def verify():
r = getRedisClient()
if r.exists("{e2Manager},LOAD:test1"):
return True
else:
return False

View File

@@ -0,0 +1,97 @@
##############################################################################
#
# 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
import json
def getRedisClientDecodeResponse():
c = config.redis_ip_address
p = config.redis_ip_port
return redis.Redis(host=c, port=p, db=0, decode_responses=True)
def set_general_config_resource_status_false():
r = getRedisClientDecodeResponse()
r.set("{rsm},CFG:GENERAL:v1.0.0" , "{\"enableResourceStatus\":false,\"partialSuccessAllowed\":true,\"prbPeriodic\":true,\"tnlLoadIndPeriodic\":true,\"wwLoadIndPeriodic\":true,\"absStatusPeriodic\":true,\"rsrpMeasurementPeriodic\":true,\"csiPeriodic\":true,\"periodicityMs\":1,\"periodicityRsrpMeasurementMs\":3,\"periodicityCsiMs\":3}")
def verify_rsm_ran_info_start_false():
r = getRedisClientDecodeResponse()
value = "{\"ranName\":\"test1\",\"enb1MeasurementId\":1,\"enb2MeasurementId\":0,\"action\":\"start\",\"actionStatus\":false}"
return r.get("{rsm},RAN:test1") == value
def verify_rsm_ran_info_start_true():
r = getRedisClientDecodeResponse()
rsmInfoStr = r.get("{rsm},RAN:test1")
rsmInfoJson = json.loads(rsmInfoStr)
response = rsmInfoJson["ranName"] == "test1" and rsmInfoJson["enb1MeasurementId"] == 1 and rsmInfoJson["enb2MeasurementId"] != 1 and rsmInfoJson["action"] == "start" and rsmInfoJson["actionStatus"] == True
return response
def verify_rsm_ran_info_stop_false():
r = getRedisClientDecodeResponse()
rsmInfoStr = r.get("{rsm},RAN:test1")
rsmInfoJson = json.loads(rsmInfoStr)
response = rsmInfoJson["ranName"] == "test1" and rsmInfoJson["enb1MeasurementId"] == 1 and rsmInfoJson["action"] == "stop" and rsmInfoJson["actionStatus"] == False
return response
def verify_rsm_ran_info_stop_true():
r = getRedisClientDecodeResponse()
rsmInfoStr = r.get("{rsm},RAN:test1")
rsmInfoJson = json.loads(rsmInfoStr)
response = rsmInfoJson["ranName"] == "test1" and rsmInfoJson["action"] == "stop" and rsmInfoJson["actionStatus"] == True
return response
def verify_general_config_enable_resource_status_true():
r = getRedisClientDecodeResponse()
configStr = r.get("{rsm},CFG:GENERAL:v1.0.0")
configJson = json.loads(configStr)
return configJson["enableResourceStatus"] == True
def verify_general_config_enable_resource_status_false():
r = getRedisClientDecodeResponse()
configStr = r.get("{rsm},CFG:GENERAL:v1.0.0")
configJson = json.loads(configStr)
return configJson["enableResourceStatus"] == False

View File

@@ -0,0 +1,67 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Resource ../Resource/scripts_variables.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library REST ${url}
Suite Teardown Start RoutingManager Simulator
*** Test Cases ***
Stop Routing manager simulator and restarting simulator
Stop RoutingManager Simulator
Restart simulator with less docker
prepare logs for tests
Remove log files
Save logs
Get request gnb
Sleep 2s
Get Request node b gnb
Integer response status 200
String response body ranName ${ranname}
String response body connectionStatus DISCONNECTED
String response body nodeType GNB
Integer response body gnb ranFunctions 0 ranFunctionId 1
Integer response body gnb ranFunctions 0 ranFunctionRevision 1
Integer response body gnb ranFunctions 1 ranFunctionId 2
Integer response body gnb ranFunctions 1 ranFunctionRevision 1
Integer response body gnb ranFunctions 2 ranFunctionId 3
Integer response body gnb ranFunctions 2 ranFunctionRevision 1
E2M Logs - Verify RMR Message
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${Setup_failure_message_type} ${None}
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation Setup Failure

View File

@@ -0,0 +1,38 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library REST ${url}
Suite Teardown Start Dbass
*** Test Cases ***
Get All nodes - 500 http - 500 RNIB error
Stop Dbass
GET /v1/nodeb/ids
Integer response status 500
Integer response body errorCode 500
String response body errorMessage RNIB error

View File

@@ -0,0 +1,37 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Get Request node b gnb - resource not found 404
GET /v1/nodeb/test5
Integer response status 404
Integer response body errorCode 404
String response body errorMessage "Resource not found"

View File

@@ -0,0 +1,53 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/scripts_variables.robot
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library ../Scripts/find_error_script.py
Library OperatingSystem
Library REST ${url}
Suite Teardown Start Dbass
*** Test Cases ***
Get node b gnb - DB down - 500
Stop Dbass
GET /v1/nodeb/test5
Integer response status 500
Integer response body errorCode 500
String response body errorMessage RNIB error
Prepare logs for tests
Remove log files
Save logs
Verify e2mgr logs - First retry to retrieve from db
${result} find_error_script.find_error ${EXECDIR} ${e2mgr_log_filename} ${first_retry_to_retrieve_from_db}
Should Be Equal As Strings ${result} True
Verify e2mgr logs - Third retry to retrieve from db
${result} find_error_script.find_error ${EXECDIR} ${e2mgr_log_filename} ${third_retry_to_retrieve_from_db}
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,38 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library REST ${url}
Suite Teardown Start Dbass
*** Test Cases ***
Red Button - Shut Dwon - 500 RNIB error
Stop Dbass
PUT /v1/nodeb/shutdown
Integer response status 500
Integer response body errorCode 500
String response body errorMessage RNIB error

View File

@@ -0,0 +1,47 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Update Ran Unhappy
Sleep 2s
Update Ran request not valid
Integer response status 400
Integer response body errorCode 402
String response body errorMessage Validation error

View File

@@ -0,0 +1,56 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Update Ran
Sleep 2s
Update Ran request
Integer response status 200
String response body ranName ${ranname}
String response body connectionStatus CONNECTED
String response body nodeType GNB
String response body gnb servedNrCells 0 servedNrCellInformation cellId abcd
String response body gnb servedNrCells 0 nrNeighbourInfos 0 nrCgi one
String response body gnb servedNrCells 0 servedNrCellInformation servedPlmns 0 whatever

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation Update Ran

View File

@@ -0,0 +1,82 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library REST ${url}
Resource ../Resource/scripts_variables.robot
Library String
Library Process
Library ../Scripts/find_rmr_message.py
*** Test Cases ***
X2 - Setup and Get
Post Request setup node b x-2
Get Request node b enb test1
String response body connectionStatus CONNECTED
Run Configuration update
Run ${Run_Config}
Sleep 1s
Prepare logs for tests
Remove log files
Save logs
Verify logs - Confiugration update - Begin Tag Get
${Configuration}= Grep File ./${gnb_log_filename} <ENDCConfigurationUpdate>
${ConfigurationAfterStrip}= Strip String ${Configuration}
Should Be Equal ${ConfigurationAfterStrip} <ENDCConfigurationUpdate>
Verify logs - Confiugration update - End Tag Get
${ConfigurationEnd}= Grep File ./${gnb_log_filename} </ENDCConfigurationUpdate>
${ConfigurationEndAfterStrip}= Strip String ${ConfigurationEnd}
Should Be Equal ${ConfigurationEndAfterStrip} </ENDCConfigurationUpdate>
Verify logs - Confiugration update - Ack Tag Begin
${ConfigurationAck}= Grep File ./${gnb_log_filename} <ENDCConfigurationUpdateAcknowledge>
${ConfigurationAckAfter}= Strip String ${ConfigurationAck}
Should Be Equal ${ConfigurationAckAfter} <ENDCConfigurationUpdateAcknowledge>
Verify logs - Confiugration update - Ack Tag End
${ConfigurationAckEnd}= Grep File ./${gnb_log_filename} </ENDCConfigurationUpdateAcknowledge>
${ConfigurationAckEndAfterStrip}= Strip String ${ConfigurationAckEnd}
Should Be Equal ${ConfigurationAckEndAfterStrip} </ENDCConfigurationUpdateAcknowledge>
Verify logs - find RIC_ENDC_CONF_UPDATE
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${configurationupdate_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
Verify logs - find RIC_ENDC_CONF_UPDATE_ACK
${result1} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${configurationupdate_ack_message_type} ${Meid_test1}
Should Be Equal As Strings ${result1} True

View File

@@ -0,0 +1,25 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation Configuration Update test

View File

@@ -0,0 +1,86 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library Collections
Library REST ${url}
Resource ../Resource/scripts_variables.robot
Library String
Library Process
Library ../Scripts/find_rmr_message.py
Library ../Scripts/find_error_script.py
Library ../Scripts/rsmscripts.py
*** Test Cases ***
Prepare Ran in Connected connectionStatus
# Post Request setup node b endc-setup
Set Headers ${header}
POST /v1/nodeb/endc-setup ${json}
Integer response status 204
Sleep 1s
# GET /v1/nodeb/test2
GET /v1/nodeb/test1
Integer response status 200
# String response body ranName test2
String response body ranName test1
String response body connectionStatus CONNECTED
Run Reset from RAN
Run ${Run_Config}
Sleep 1s
Prepare logs for tests
Remove log files
Save logs
#Verify logs - Reset Sent by e2adapter
# ${result} find_error_script.find_error ${EXECDIR} ${e2adapter_log_filename} ${E2ADAPTER_Setup_Resp}
# Should Be Equal As Strings ${result} True
Verify logs - Reset Sent by simulator
${Reset}= Grep File ./${gnb_log_filename} ResetRequest has been sent
Should Be Equal ${Reset} gnbe2_simu: ResetRequest has been sent
Verify logs - e2mgr logs - messege sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RIC_X2_RESET_REQ_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
Verify logs - e2mgr logs - messege received
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RIC_X2_RESET_RESP_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
RAN Restarted messege sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RAN_RESTARTED_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
RSM RESOURCE STATUS REQUEST message not sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test2}
Should Be Equal As Strings ${result} False
Verify RSM RAN info doesn't exist in redis
${result}= rsmscripts.verify_rsm_ran_info_start_false
Should Be Equal As Strings ${result} False

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation ORAN Reset - ENDC RAN to RIC Scenario 1

View File

@@ -0,0 +1,65 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/scripts_variables.robot
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
Library REST ${url}
*** Test Cases ***
Prepare Ran in Connected connectionStatus
Post Request setup node b endc-setup
Integer response status 204
Sleep 1s
GET /v1/nodeb/test2
Integer response status 200
String response body ranName test2
String response body connectionStatus CONNECTED
Send Reset reqeust with no cause
Set Headers ${header}
PUT /v1/nodeb/test2/reset
Integer response status 204
Prepare logs for tests
Remove log files
Save logs
RAN Restarted messege sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RAN_RESTARTED_message_type} ${Meid_test2}
Should Be Equal As Strings ${result} True
RSM RESOURCE STATUS REQUEST message not sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test2}
Should Be Equal As Strings ${result} False
Verify RSM RAN info doesn't exist in redis
${result}= rsmscripts.verify_rsm_ran_info_start_false
Should Be Equal As Strings ${result} False

View File

@@ -0,0 +1,66 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/scripts_variables.robot
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
Library REST ${url}
*** Test Cases ***
Prepare Ran in Connected connectionStatus
Post Request setup node b endc-setup
Integer response status 204
Sleep 1s
GET /v1/nodeb/test2
Integer response status 200
String response body ranName test2
String response body connectionStatus CONNECTED
Send Reset reqeust with cause
Set Headers ${header}
PUT /v1/nodeb/test2/reset ${resetcausejson}
Integer response status 204
Prepare logs for tests
Remove log files
Save logs
RAN Restarted messege sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RAN_RESTARTED_message_type} ${Meid_test2}
Should Be Equal As Strings ${result} True
RSM RESOURCE STATUS REQUEST message not sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test2}
Should Be Equal As Strings ${result} False
Verify RSM RAN info doesn't exist in redis
${result}= rsmscripts.verify_rsm_ran_info_start_false
Should Be Equal As Strings ${result} False

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation ORAN Reset API - ENDC RIC to RAN

View File

@@ -0,0 +1,56 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Simulator For Load Information
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library Process
Library ../Scripts/loadscripts.py
Library REST ${url}
Suite Teardown Stop Simulator
*** Test Cases ***
Verify Load information doesn't exist in redis
${result}= loadscripts.verify
Should Be Equal As Strings ${result} False
Adding Load information to overwrite on
${result}= loadscripts.add
Should Be Equal As Strings ${result} True
Trigger X-2 Setup for load information
Post Request setup node b x-2
Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
String response body connectionStatus CONNECTED
Verify Load information exists in redis
${result}= loadscripts.verify_value
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,56 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Simulator For Load Information
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library Process
Library ../Scripts/loadscripts.py
Library REST ${url}
Suite Teardown Stop Simulator
*** Test Cases ***
Verify Load information doesn't exist in redis
${result}= loadscripts.verify
Should Be Equal As Strings ${result} False
Trigger X-2 Setup for load information
Post Request setup node b x-2
Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
String response body connectionStatus CONNECTED
Verify Load information does exist in redis
Sleep 2s
${result}= loadscripts.verify
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation ORAN Load Infomration scenarios

View File

@@ -0,0 +1,20 @@
##############################################################################
#
# 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 Resource status

View File

@@ -0,0 +1,57 @@
##############################################################################
#
# 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
Resource ../Resource/scripts_variables.robot
Resource resource_status_keywords.robot
Library ../Scripts/rsmscripts.py
Library ../Scripts/find_rmr_message.py
Library OperatingSystem
Library REST ${url_rsm}
Suite Teardown Delete All Sessions
*** Test Cases ***
Run setup
rsmscripts.set_general_config_resource_status_false
Prepare Ran In Connected Status
Put Http Start Request To RSM
Put Request Resource Status Start
Integer response status 204
Verify RSM RAN Info Status Is Start And True In Redis
Sleep 1s
${result}= rsmscripts.verify_rsm_ran_info_start_true
Should Be Equal As Strings ${result} True
Verify RSM Enable Resource Status Is True In General Configuration In Redis
${result}= rsmscripts.verify_general_config_enable_resource_status_true
Should Be Equal As Strings ${result} True
prepare logs for tests
Remove log files
Save logs
Verify RSM Resource Status Request Message Sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,56 @@
##############################################################################
#
# 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
Resource ../Resource/scripts_variables.robot
Resource resource_status_keywords.robot
Library ../Scripts/rsmscripts.py
Library ../Scripts/find_rmr_message.py
Library OperatingSystem
Library REST ${url_rsm}
Suite Teardown Delete All Sessions
*** Test Cases ***
Run setup
rsmscripts.set_general_config_resource_status_false
Prepare Ran In Connected Status
Put Http Stop Request To RSM
Put Request Resource Status Stop
Integer response status 204
Verify RSM RAN Info Status Is Stop And True In Redis
${result}= rsmscripts.verify_rsm_ran_info_stop_true
Should Be Equal As Strings ${result} True
Verify RSM Enable Resource Status Is False In General Configuration In Redis
${result}= rsmscripts.verify_general_config_enable_resource_status_false
Should Be Equal As Strings ${result} True
prepare logs for tests
Remove log files
Save logs
Verify RSM Resource Status Request Message Not Sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} False

View File

@@ -0,0 +1,36 @@
##############################################################################
#
# 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 Keywords file
Library ../Scripts/cleanup_db.py
Resource ../Resource/resource.robot
Library Collections
Library OperatingSystem
Library json
Library RequestsLibrary
*** Keywords ***
Prepare Ran In Connected Status
Create Session x2setup ${url}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
${resp}= Post Request x2setup /v1/nodeb/x2-setup data=${json_setup_rsm_tests} headers=${headers}
Should Be Equal As Strings ${resp.status_code} 204

View File

@@ -0,0 +1,55 @@
##############################################################################
#
# 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
Resource ../Resource/scripts_variables.robot
Resource resource_status_keywords.robot
Library ../Scripts/rsmscripts.py
Library ../Scripts/find_rmr_message.py
Library OperatingSystem
Library REST ${url_rsm}
Suite Teardown Delete All Sessions
*** Test Cases ***
Run setup
Prepare Ran In Connected Status
Put Http Start Request To RSM
Put Request Resource Status Start
Integer response status 204
Verify RSM RAN Info Status Is Start And True In Redis
Sleep 1s
${result}= rsmscripts.verify_rsm_ran_info_start_true
Should Be Equal As Strings ${result} True
Verify RSM Enable Resource Status Is True In General Configuration In Redis
${result}= rsmscripts.verify_general_config_enable_resource_status_true
Should Be Equal As Strings ${result} True
prepare logs for RSM tests
Remove log files
Save logs
Verify RSM Resource Status Request Message Sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,54 @@
##############################################################################
#
# 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
Resource ../Resource/scripts_variables.robot
Resource resource_status_keywords.robot
Library ../Scripts/rsmscripts.py
Library ../Scripts/find_rmr_message.py
Library OperatingSystem
Library REST ${url_rsm}
Suite Teardown Delete All Sessions
*** Test Cases ***
Run setup
Prepare Ran In Connected Status
Put Http Stop Request To RSM
Put Request Resource Status Stop
Integer response status 204
#Verify RSM RAN Info Status Is Stop And False In Redis
#${result}= rsmscripts.verify_rsm_ran_info_stop_false
#Should Be Equal As Strings ${result} True
Verify RSM Enable Resource Status Is False In General Configuration In Redis
${result}= rsmscripts.verify_general_config_enable_resource_status_false
Should Be Equal As Strings ${result} True
prepare logs for tests
Remove log files
Save logs
Verify RSM Resource Status Request Message Sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,46 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Resource red_button_keywords.robot
Library OperatingSystem
Library Collections
Library REST ${url}
*** Test Cases ***
Verify gnb nodeb connection status is CONNECTED and it's associated to an e2t instance
Verify connected and associated
Execute Shutdown
Execute Shutdown
Verify nodeb's connection status is SHUT_DOWN and it's NOT associated to an e2t instance
Verify shutdown for gnb
Verify E2T instance has no associated RANs
Verify E2T instance has no associated RANs

View File

@@ -0,0 +1,58 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Library Collections
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Reset - 400 http - 401 Corrupted json
Post Request setup node b x-2
Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
String response body connectionStatus CONNECTED
Set Headers ${header}
PUT /v1/nodeb/test1/reset {abc}
Integer response status 400
Integer response body errorCode 401
String response body errorMessage corrupted json
Reset - 400 http - 401 Validation error
Set Headers ${header}
PUT /v1/nodeb/test1/reset ${resetbadcausejson}
Integer response status 400
Integer response body errorCode 402
String response body errorMessage Validation error

View File

@@ -0,0 +1,57 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Library Collections
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library OperatingSystem
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]} ${docker_number-1}
Reset - 400 http - 403 wrong state
Post Request setup node b x-2
Integer response status 204
Sleep 10s
GET /v1/nodeb/test1
String response body connectionStatus DISCONNECTED
Set Headers ${header}
PUT /v1/nodeb/test1/reset
#Output
Integer response status 400
Integer response body errorCode 403
String response body errorMessage ${403_reset_message}

View File

@@ -0,0 +1,38 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Reset - 404 http - 404 Corrupted json
Set Headers ${header}
PUT /v1/nodeb/test11/reset
Integer response status 404
Integer response body errorCode 404
String response body errorMessage Resource not found

View File

@@ -0,0 +1,51 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Library Collections
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Endc-setup - 400 http - 401 Corrupted json
Set Headers ${header}
POST /v1/nodeb/endc-setup
Integer response status 400
Integer response body errorCode 401
String response body errorMessage corrupted json
Endc-setup - 400 http - 402 Validation error
Set Headers ${header}
POST /v1/nodeb/endc-setup ${endcbadjson}
Integer response status 400
Integer response body errorCode 402
String response body errorMessage Validation error

View File

@@ -0,0 +1,39 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library REST ${url}
Suite Teardown Start Dbass
*** Test Cases ***
ENDC-setup - 500 http - 500 RNIB error
Stop Dbass
Set Headers ${header}
POST /v1/nodeb/endc-setup ${json}
Integer response status 500
Integer response body errorCode 500
String response body errorMessage RNIB error

View File

@@ -0,0 +1,42 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library ../Scripts/e2mdbscripts.py
Library REST ${url}
Suite Teardown Start RoutingManager Simulator
*** Test Cases ***
ENDC-setup - 503 http - 511 No Routing Manager Available
Stop RoutingManager Simulator
Set Headers ${header}
POST /v1/nodeb/x2-setup ${json}
Integer response status 503
Integer response body errorCode 511
String response body errorMessage No Routing Manager Available
Verify RAN is NOT associated with E2T instance
${result} e2mdbscripts.verify_ran_is_associated_with_e2t_instance test1 e2t.att.com:38000
Should Be True ${result} == False

View File

@@ -0,0 +1,46 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/Keywords.robot
Resource ../Resource/resource.robot
Library OperatingSystem
Library REST ${url}
*** Test Cases ***
Post Request setup node b x2-setup - setup failure
Set Headers ${header}
POST /v1/nodeb/x2-setup ${json}
Sleep 1s
POST /v1/nodeb/x2-setup ${json}
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
String response body connectionStatus CONNECTED_SETUP_FAILED
String response body failureType X2_SETUP_FAILURE

View File

@@ -0,0 +1,81 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Resource ../Resource/scripts_variables.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
Library ../Scripts/e2mdbscripts.py
Library REST ${url}
*** Test Cases ***
X2 - Setup Test
Post Request setup node b x-2
Integer response status 204
X2 - Get Nodeb
Get Request Node B Enb test1
Integer response status 200
String response body ranName test1
String response body ip ${ip_gnb_simu}
Integer response body port 5577
String response body connectionStatus CONNECTED
String response body nodeType ENB
String response body associatedE2tInstanceAddress e2t.att.com:38000
String response body enb enbType MACRO_ENB
Integer response body enb servedCells 0 pci 99
String response body enb servedCells 0 cellId 02f829:0007ab00
String response body enb servedCells 0 tac 0102
String response body enb servedCells 0 broadcastPlmns 0 "02f829"
Integer response body enb servedCells 0 choiceEutraMode fdd ulearFcn 1
Integer response body enb servedCells 0 choiceEutraMode fdd dlearFcn 1
String response body enb servedCells 0 choiceEutraMode fdd ulTransmissionBandwidth BW50
String response body enb servedCells 0 choiceEutraMode fdd dlTransmissionBandwidth BW50
prepare logs for tests
Remove log files
Save logs
X2 - RAN Connected message going to be sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RAN_CONNECTED_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
RSM RESOURCE STATUS REQUEST message sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} True
Verify RSM RAN info exists in redis
${result}= rsmscripts.verify_rsm_ran_info_start_false
Should Be Equal As Strings ${result} True
Verify RAN is associated with E2T instance
${result} e2mdbscripts.verify_ran_is_associated_with_e2t_instance test1 e2t.att.com:38000
Should Be True ${result}

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation X2-Setup ENB

View File

@@ -0,0 +1,67 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Resource ../Resource/scripts_variables.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
Library ../Scripts/e2mdbscripts.py
Library REST ${url}
*** Test Cases ***
X2 - Setup Test 1
Post Request setup node b x-2
Integer response status 204
X2 - Setup Test 2
Post Request setup node b x-2
Integer response status 204
X2 - Get Nodeb
Get Request Node B Enb test1
Integer response status 200
String response body ranName test1
String response body associatedE2tInstanceAddress e2t.att.com:38000
prepare logs for tests
Remove log files
Save logs
X2 - RAN Connected message going to be sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RAN_CONNECTED_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
RSM RESOURCE STATUS REQUEST message sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} True
Verify RSM RAN info exists in redis
${result}= rsmscripts.verify_rsm_ran_info_start_false
Should Be Equal As Strings ${result} True
Verify RAN is associated with E2T instance
${result} e2mdbscripts.verify_ran_is_associated_with_e2t_instance test1 e2t.att.com:38000
Should Be True ${result}

View File

@@ -0,0 +1,71 @@
##############################################################################
#
# 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
Resource ../Resource/scripts_variables.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
Library ../Scripts/e2mdbscripts.py
Library REST ${url}
*** Test Cases ***
X2 - Setup Test 1
Post Request setup node b x-2
Integer response status 204
Restart Simulator
Restart Simulator
Verify RAN is NOT associated with E2T instance
${result} e2mdbscripts.verify_ran_is_associated_with_e2t_instance test1 e2t.att.com:38000
Should Be True ${result} == False
X2 - Setup Test 2
Post Request setup node b x-2
Integer response status 204
X2 - Get Nodeb
Get Request Node B Enb test1
Integer response status 200
String response body ranName test1
String response body associatedE2tInstanceAddress e2t.att.com:38000
prepare logs for tests
Remove log files
Save logs
X2 - RAN Connected message going to be sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RAN_CONNECTED_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
RSM RESOURCE STATUS REQUEST message sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} True
Verify RSM RAN info exists in redis
${result}= rsmscripts.verify_rsm_ran_info_start_false
Should Be Equal As Strings ${result} True
Verify RAN is associated with E2T instance
${result} e2mdbscripts.verify_ran_is_associated_with_e2t_instance test1 e2t.att.com:38000
Should Be True ${result}

View File

@@ -0,0 +1,79 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library Collections
Library REST ${url}
Resource ../Resource/scripts_variables.robot
Library String
Library Process
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
*** Test Cases ***
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
Integer response status 204
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
Prepare logs for tests
Remove log files
Save logs
Verify logs - Reset Sent by simulator
${Reset}= Grep File ./${gnb_log_filename} ResetRequest has been sent
Should Be Equal ${Reset} gnbe2_simu: ResetRequest has been sent
Verify logs - e2mgr logs - messege sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RIC_X2_RESET_REQ_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
Verify logs - e2mgr logs - messege received
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RIC_X2_RESET_RESP_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
RAN Restarted messege sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RAN_RESTARTED_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
RSM RESOURCE STATUS REQUEST message sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} True
Verify RSM RAN info exists in redis
${result}= rsmscripts.verify_rsm_ran_info_start_false
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation ORAN Reset - X2 RAN to RIC Scenario 1

View File

@@ -0,0 +1,81 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library Collections
Library REST ${url}
Resource ../Resource/scripts_variables.robot
Library String
Library Process
Library ../Scripts/find_rmr_message.py
Library ../Scripts/find_error_script.py
Suite Teardown Start Dbass with 4 dockers
*** Test Cases ***
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
String response body ranName test1
String response body connectionStatus CONNECTED
Stop RNIB
Stop Dbass
Run Reset from RAN
Run ${Run_Config}
Sleep 60s
Prepare logs for tests
Remove log files
Save logs
Verify logs - Reset Sent by simulator
${Reset}= Grep File ./${gnb_log_filename} ResetRequest has been sent
Should Be Equal ${Reset} gnbe2_simu: ResetRequest has been sent
Verify logs for restart received
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RIC_X2_RESET_REQ_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
Verify for error on retrying
${result} find_error_script.find_error ${EXECDIR} ${e2mgr_log_filename} ${failed_to_retrieve_nodeb_message}
Should Be Equal As Strings ${result} True
*** Keywords ***
Start Dbass with 4 dockers
Run And Return Rc And Output ${dbass_remove}
Run And Return Rc And Output ${dbass_start}
Sleep 5s
${result}= Run And Return Rc And Output ${docker_command}
Should Be Equal As Integers ${result[1]} ${docker_number-1}

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation ORAN Reset - RAN to RIC Scenario Unhappy

View File

@@ -0,0 +1,65 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/scripts_variables.robot
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
Library REST ${url}
*** Test Cases ***
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
String response body ranName test1
String response body connectionStatus CONNECTED
Send Reset reqeust with no cause
Set Headers ${header}
PUT /v1/nodeb/test1/reset
Integer response status 204
Prepare logs for tests
Remove log files
Save logs
RAN Restarted messege sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RAN_RESTARTED_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
RSM RESOURCE STATUS REQUEST message sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} True
Verify RSM RAN info exists in redis
${result}= rsmscripts.verify_rsm_ran_info_start_false
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,66 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Suite Setup Prepare Enviorment
Resource ../Resource/scripts_variables.robot
Resource ../Resource/resource.robot
Resource ../Resource/Keywords.robot
Library OperatingSystem
Library ../Scripts/find_rmr_message.py
Library ../Scripts/rsmscripts.py
Library REST ${url}
*** Test Cases ***
Prepare Ran in Connected connectionStatus
Post Request setup node b x-2
Integer response status 204
Sleep 1s
GET /v1/nodeb/test1
Integer response status 200
String response body ranName test1
String response body connectionStatus CONNECTED
Send Reset reqeust with cause
Set Headers ${header}
PUT /v1/nodeb/test1/reset ${resetcausejson}
Integer response status 204
Prepare logs for tests
Remove log files
Save logs
RAN Restarted messege sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${e2mgr_log_filename} ${RAN_RESTARTED_message_type} ${Meid_test1}
Should Be Equal As Strings ${result} True
RSM RESOURCE STATUS REQUEST message sent
${result} find_rmr_message.verify_logs ${EXECDIR} ${rsm_log_filename} ${RIC_RES_STATUS_REQ_message_type_successfully_sent} ${RAN_NAME_test1}
Should Be Equal As Strings ${result} True
Verify RSM RAN info exists in redis
${result}= rsmscripts.verify_rsm_ran_info_start_false
Should Be Equal As Strings ${result} True

View File

@@ -0,0 +1,24 @@
##############################################################################
#
# Copyright (c) 2019 AT&T Intellectual Property.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# This source code is part of the near-RT RIC (RAN Intelligent Controller)
# platform project (RICP).
#
*** Settings ***
Documentation ORAN Reset API - X2 RIC to RAN

View File

@@ -0,0 +1,4 @@
#!/bin/bash
cd /opt/Tests
robot .