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

17
setup/e2mgr/.gitignore vendored Normal file
View File

@@ -0,0 +1,17 @@
/.idea/*
.vscode/launch.json
*.o
*.a
E2Manager/3rdparty/asn1codec/e2ap_engine/converter-example
E2Manager/3rdparty/asn1codec/tests/
E2Manager/cp.out
Automation/Tests/**/*.xml
__pycache__/
*.html
*.log
# documentation
.tox
docs/_build/
/.gitreview
E2Manager/coverage.txt
E2Manager/e2m

View File

@@ -0,0 +1,20 @@
---
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
formats:
- htmlzip
build:
image: latest
python:
version: 3.7
install:
- requirements: docs/requirements-docs.txt
sphinx:
configuration: docs/conf.py

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 .

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="0.185205240">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.185205240" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.185205240" name="Default" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.connection=http://127.0.0.1:2375" parent="org.eclipse.cdt.build.core.prefbase.cfg">
<folderInfo id="0.185205240." name="/" resourcePath="">
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.721725282" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.721725282.638857149" name=""/>
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1591100253" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1799128674" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.282918221" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.271732010" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1005745722" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1856122225" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.74715445" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="org.eclipse.cdt.build.core.settings.holder.incpaths.487224202" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-linux-gnu/7/include"/>
<listOptionValue builtIn="false" value="/usr/include/x86_64-linux-gnu"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.808058438" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
</toolChain>
</folderInfo>
<fileInfo id="0.185205240.2054672562" name="configuration_update_wrapper.c" rcbsApplicability="disable" resourcePath="src/configuration_update_wrapper.c" toolsToInvoke="org.eclipse.cdt.build.core.settings.holder.74715445.1888082156">
<tool id="org.eclipse.cdt.build.core.settings.holder.74715445.1888082156" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder.282918221">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="org.eclipse.cdt.build.core.settings.holder.incpaths.1119711765" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1074471625" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
</fileInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="asn1codec.null.2042648690" name="asn1codec"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="0.185205240">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="refreshScope"/>
</cproject>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>asn1codec</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,72 @@
##############################################################################
#
# 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).
#
CFLAGS=-Wall -Wpedantic -std=c11 -Og -I./inc -I./src -I./e2ap_engine -DASN_DISABLE_OER_SUPPORT -DASN_PDU_COLLECTION -D_POSIX_C_SOURCE=200809L -ggdb
export CFLAGS
OBJDIR=lib
LIB=$(OBJDIR)/libe2ap_codec.a
LIBSRC=configuration_update_wrapper.c x2setup_request_wrapper.c x2reset_request_wrapper.c x2reset_response_wrapper.c asn1codec_utils.c
LIBOBJ=$(addprefix $(OBJDIR)/,$(LIBSRC:.c=.o))
TESTX2SETUPREQUEST=tests/x2setup_request_wrapper_test
TESTCONFUPDATE=tests/configuration_update_wrapper_test
TESTX2RESETREQUEST=tests/x2reset_request_wrapper_test
TESTX2RESETRESPONSE=tests/x2reset_response_wrapper_test
TESTUNPACKXER=tests/unpack_xer
.PHONY: all clean e2ap_engine
all: $(LIB) $(TESTX2SETUPREQUEST) $(TESTCONFUPDATE) $(TESTX2RESETREQUEST) $(TESTUNPACKXER) $(TESTX2RESETRESPONSE)
e2ap_engine/libasncodec.a:
cd e2ap_engine/ && make -f converter-example.mk
$(OBJDIR)/%.o: src/%.c e2ap_engine/*.h
mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@
$(LIB): e2ap_engine/libasncodec.a $(LIBOBJ)
$(AR) -crv $(LIB) $(LIBOBJ)
$(TESTX2SETUPREQUEST): % : $(LIB) src/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) src/$@.c -o $@ $(LIB) e2ap_engine/libasncodec.a
$(TESTCONFUPDATE): % : $(LIB) src/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) src/$@.c -o $@ $(LIB) e2ap_engine/libasncodec.a
$(TESTX2RESETREQUEST): % : $(LIB) src/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) src/$@.c -o $@ $(LIB) e2ap_engine/libasncodec.a
$(TESTUNPACKXER): % : $(LIB) src/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) src/$@.c -o $@ $(LIB) e2ap_engine/libasncodec.a
$(TESTX2RESETRESPONSE): % : $(LIB) src/%.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) src/$@.c -o $@ $(LIB) e2ap_engine/libasncodec.a
clean:
rm -rf $(OBJDIR) tests
clobber:
cd e2ap_engine/ && make -f converter-example.mk clean
rm -rf $(OBJDIR) tests

View File

@@ -0,0 +1,96 @@
/*
* Copyright 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).
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "../../asnFiles/X2AP-IEs.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ABS-Status.h"
#include "ProtocolExtensionContainer.h"
asn_TYPE_member_t asn_MBR_ABS_Status_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ABS_Status, dL_ABS_status),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_DL_ABS_status,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"dL-ABS-status"
},
{ ATF_NOFLAGS, 0, offsetof(struct ABS_Status, usableABSInformation),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_UsableABSInformation,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"usableABSInformation"
},
{ ATF_POINTER, 1, offsetof(struct ABS_Status, iE_Extensions),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProtocolExtensionContainer_170P106,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"iE-Extensions"
},
};
static const int asn_MAP_ABS_Status_oms_1[] = { 2 };
static const ber_tlv_tag_t asn_DEF_ABS_Status_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ABS_Status_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* dL-ABS-status */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* usableABSInformation */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
};
asn_SEQUENCE_specifics_t asn_SPC_ABS_Status_specs_1 = {
sizeof(struct ABS_Status),
offsetof(struct ABS_Status, _asn_ctx),
asn_MAP_ABS_Status_tag2el_1,
3, /* Count of tags in the map */
asn_MAP_ABS_Status_oms_1, /* Optional members */
1, 0, /* Root/Additions */
3, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ABS_Status = {
"ABS-Status",
"ABS-Status",
&asn_OP_SEQUENCE,
asn_DEF_ABS_Status_tags_1,
sizeof(asn_DEF_ABS_Status_tags_1)
/sizeof(asn_DEF_ABS_Status_tags_1[0]), /* 1 */
asn_DEF_ABS_Status_tags_1, /* Same as above */
sizeof(asn_DEF_ABS_Status_tags_1)
/sizeof(asn_DEF_ABS_Status_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_ABS_Status_1,
3, /* Elements count */
&asn_SPC_ABS_Status_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,73 @@
/*
* Copyright 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).
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "../../asnFiles/X2AP-IEs.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ABS_Status_H_
#define _ABS_Status_H_
#include "asn_application.h"
/* Including external dependencies */
#include "DL-ABS-status.h"
#include "UsableABSInformation.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Forward declarations */
struct ProtocolExtensionContainer;
/* ABS-Status */
typedef struct ABS_Status {
DL_ABS_status_t dL_ABS_status;
UsableABSInformation_t usableABSInformation;
struct ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ABS_Status_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ABS_Status;
extern asn_SEQUENCE_specifics_t asn_SPC_ABS_Status_specs_1;
extern asn_TYPE_member_t asn_MBR_ABS_Status_1[3];
#ifdef __cplusplus
}
#endif
#endif /* _ABS_Status_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,97 @@
/*
* Copyright 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).
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "../../asnFiles/X2AP-IEs.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ABSInformation.h"
#include "ABSInformationFDD.h"
#include "ABSInformationTDD.h"
asn_per_constraints_t asn_PER_type_ABSInformation_constr_1 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
asn_TYPE_member_t asn_MBR_ABSInformation_1[] = {
{ ATF_POINTER, 0, offsetof(struct ABSInformation, choice.fdd),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ABSInformationFDD,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"fdd"
},
{ ATF_POINTER, 0, offsetof(struct ABSInformation, choice.tdd),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ABSInformationTDD,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"tdd"
},
{ ATF_NOFLAGS, 0, offsetof(struct ABSInformation, choice.abs_inactive),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NULL,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"abs-inactive"
},
};
static const asn_TYPE_tag2member_t asn_MAP_ABSInformation_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fdd */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tdd */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* abs-inactive */
};
asn_CHOICE_specifics_t asn_SPC_ABSInformation_specs_1 = {
sizeof(struct ABSInformation),
offsetof(struct ABSInformation, _asn_ctx),
offsetof(struct ABSInformation, present),
sizeof(((struct ABSInformation *)0)->present),
asn_MAP_ABSInformation_tag2el_1,
3, /* Count of tags in the map */
0, 0,
3 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_ABSInformation = {
"ABSInformation",
"ABSInformation",
&asn_OP_CHOICE,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
{ 0, &asn_PER_type_ABSInformation_constr_1, CHOICE_constraint },
asn_MBR_ABSInformation_1,
3, /* Elements count */
&asn_SPC_ABSInformation_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,87 @@
/*
* Copyright 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).
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "../../asnFiles/X2AP-IEs.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ABSInformation_H_
#define _ABSInformation_H_
#include "asn_application.h"
/* Including external dependencies */
#include "NULL.h"
#include "constr_CHOICE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum ABSInformation_PR {
ABSInformation_PR_NOTHING, /* No components present */
ABSInformation_PR_fdd,
ABSInformation_PR_tdd,
ABSInformation_PR_abs_inactive
/* Extensions may appear below */
} ABSInformation_PR;
/* Forward declarations */
struct ABSInformationFDD;
struct ABSInformationTDD;
/* ABSInformation */
typedef struct ABSInformation {
ABSInformation_PR present;
union ABSInformation_u {
struct ABSInformationFDD *fdd;
struct ABSInformationTDD *tdd;
NULL_t abs_inactive;
/*
* This type is extensible,
* possible extensions are below.
*/
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ABSInformation_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ABSInformation;
extern asn_CHOICE_specifics_t asn_SPC_ABSInformation_specs_1;
extern asn_TYPE_member_t asn_MBR_ABSInformation_1[3];
extern asn_per_constraints_t asn_PER_type_ABSInformation_constr_1;
#ifdef __cplusplus
}
#endif
#endif /* _ABSInformation_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,228 @@
/*
* Copyright 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).
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "../../asnFiles/X2AP-IEs.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ABSInformationFDD.h"
#include "ProtocolExtensionContainer.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
static int
memb_abs_pattern_info_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 40)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_measurement_subset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size == 40)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t asn_PER_type_numberOfCellSpecificAntennaPorts_constr_3 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_abs_pattern_info_constr_2 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 40, 40 } /* (SIZE(40..40)) */,
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_measurement_subset_constr_8 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 0, 0, 40, 40 } /* (SIZE(40..40)) */,
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_3[] = {
{ 0, 3, "one" },
{ 1, 3, "two" },
{ 2, 4, "four" }
/* This list is extensible */
};
static const unsigned int asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_3[] = {
2, /* four(2) */
0, /* one(0) */
1 /* two(1) */
/* This list is extensible */
};
static const asn_INTEGER_specifics_t asn_SPC_numberOfCellSpecificAntennaPorts_specs_3 = {
asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_3, /* "tag" => N; sorted by tag */
asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_3, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
4, /* Extensions before this member */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_numberOfCellSpecificAntennaPorts_tags_3[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_numberOfCellSpecificAntennaPorts_3 = {
"numberOfCellSpecificAntennaPorts",
"numberOfCellSpecificAntennaPorts",
&asn_OP_NativeEnumerated,
asn_DEF_numberOfCellSpecificAntennaPorts_tags_3,
sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3)
/sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3[0]) - 1, /* 1 */
asn_DEF_numberOfCellSpecificAntennaPorts_tags_3, /* Same as above */
sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3)
/sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3[0]), /* 2 */
{ 0, &asn_PER_type_numberOfCellSpecificAntennaPorts_constr_3, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_numberOfCellSpecificAntennaPorts_specs_3 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ABSInformationFDD_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ABSInformationFDD, abs_pattern_info),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_abs_pattern_info_constr_2, memb_abs_pattern_info_constraint_1 },
0, 0, /* No default value */
"abs-pattern-info"
},
{ ATF_NOFLAGS, 0, offsetof(struct ABSInformationFDD, numberOfCellSpecificAntennaPorts),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_numberOfCellSpecificAntennaPorts_3,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"numberOfCellSpecificAntennaPorts"
},
{ ATF_NOFLAGS, 0, offsetof(struct ABSInformationFDD, measurement_subset),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_measurement_subset_constr_8, memb_measurement_subset_constraint_1 },
0, 0, /* No default value */
"measurement-subset"
},
{ ATF_POINTER, 1, offsetof(struct ABSInformationFDD, iE_Extensions),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProtocolExtensionContainer_170P104,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"iE-Extensions"
},
};
static const int asn_MAP_ABSInformationFDD_oms_1[] = { 3 };
static const ber_tlv_tag_t asn_DEF_ABSInformationFDD_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ABSInformationFDD_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* abs-pattern-info */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* numberOfCellSpecificAntennaPorts */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* measurement-subset */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
};
asn_SEQUENCE_specifics_t asn_SPC_ABSInformationFDD_specs_1 = {
sizeof(struct ABSInformationFDD),
offsetof(struct ABSInformationFDD, _asn_ctx),
asn_MAP_ABSInformationFDD_tag2el_1,
4, /* Count of tags in the map */
asn_MAP_ABSInformationFDD_oms_1, /* Optional members */
1, 0, /* Root/Additions */
4, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ABSInformationFDD = {
"ABSInformationFDD",
"ABSInformationFDD",
&asn_OP_SEQUENCE,
asn_DEF_ABSInformationFDD_tags_1,
sizeof(asn_DEF_ABSInformationFDD_tags_1)
/sizeof(asn_DEF_ABSInformationFDD_tags_1[0]), /* 1 */
asn_DEF_ABSInformationFDD_tags_1, /* Same as above */
sizeof(asn_DEF_ABSInformationFDD_tags_1)
/sizeof(asn_DEF_ABSInformationFDD_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_ABSInformationFDD_1,
4, /* Elements count */
&asn_SPC_ABSInformationFDD_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,85 @@
/*
* Copyright 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).
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "../../asnFiles/X2AP-IEs.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ABSInformationFDD_H_
#define _ABSInformationFDD_H_
#include "asn_application.h"
/* Including external dependencies */
#include "BIT_STRING.h"
#include "NativeEnumerated.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum ABSInformationFDD__numberOfCellSpecificAntennaPorts {
ABSInformationFDD__numberOfCellSpecificAntennaPorts_one = 0,
ABSInformationFDD__numberOfCellSpecificAntennaPorts_two = 1,
ABSInformationFDD__numberOfCellSpecificAntennaPorts_four = 2
/*
* Enumeration is extensible
*/
} e_ABSInformationFDD__numberOfCellSpecificAntennaPorts;
/* Forward declarations */
struct ProtocolExtensionContainer;
/* ABSInformationFDD */
typedef struct ABSInformationFDD {
BIT_STRING_t abs_pattern_info;
long numberOfCellSpecificAntennaPorts;
BIT_STRING_t measurement_subset;
struct ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ABSInformationFDD_t;
/* Implementation */
/* extern asn_TYPE_descriptor_t asn_DEF_numberOfCellSpecificAntennaPorts_3; // (Use -fall-defs-global to expose) */
extern asn_TYPE_descriptor_t asn_DEF_ABSInformationFDD;
extern asn_SEQUENCE_specifics_t asn_SPC_ABSInformationFDD_specs_1;
extern asn_TYPE_member_t asn_MBR_ABSInformationFDD_1[4];
#ifdef __cplusplus
}
#endif
#endif /* _ABSInformationFDD_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,228 @@
/*
* Copyright 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).
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "../../asnFiles/X2AP-IEs.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "ABSInformationTDD.h"
#include "ProtocolExtensionContainer.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
static int
memb_abs_pattern_info_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size >= 1 && size <= 70)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
memb_measurement_subset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(st->size > 0) {
/* Size in bits */
size = 8 * st->size - (st->bits_unused & 0x07);
} else {
size = 0;
}
if((size >= 1 && size <= 70)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_per_constraints_t asn_PER_type_numberOfCellSpecificAntennaPorts_constr_3 CC_NOTUSED = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_abs_pattern_info_constr_2 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED | APC_EXTENSIBLE, 7, 7, 1, 70 } /* (SIZE(1..70,...)) */,
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_measurement_subset_constr_8 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED | APC_EXTENSIBLE, 7, 7, 1, 70 } /* (SIZE(1..70,...)) */,
0, 0 /* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_3[] = {
{ 0, 3, "one" },
{ 1, 3, "two" },
{ 2, 4, "four" }
/* This list is extensible */
};
static const unsigned int asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_3[] = {
2, /* four(2) */
0, /* one(0) */
1 /* two(1) */
/* This list is extensible */
};
static const asn_INTEGER_specifics_t asn_SPC_numberOfCellSpecificAntennaPorts_specs_3 = {
asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_3, /* "tag" => N; sorted by tag */
asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_3, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
4, /* Extensions before this member */
1, /* Strict enumeration */
0, /* Native long size */
0
};
static const ber_tlv_tag_t asn_DEF_numberOfCellSpecificAntennaPorts_tags_3[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_numberOfCellSpecificAntennaPorts_3 = {
"numberOfCellSpecificAntennaPorts",
"numberOfCellSpecificAntennaPorts",
&asn_OP_NativeEnumerated,
asn_DEF_numberOfCellSpecificAntennaPorts_tags_3,
sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3)
/sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3[0]) - 1, /* 1 */
asn_DEF_numberOfCellSpecificAntennaPorts_tags_3, /* Same as above */
sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3)
/sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_3[0]), /* 2 */
{ 0, &asn_PER_type_numberOfCellSpecificAntennaPorts_constr_3, NativeEnumerated_constraint },
0, 0, /* Defined elsewhere */
&asn_SPC_numberOfCellSpecificAntennaPorts_specs_3 /* Additional specs */
};
asn_TYPE_member_t asn_MBR_ABSInformationTDD_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ABSInformationTDD, abs_pattern_info),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_abs_pattern_info_constr_2, memb_abs_pattern_info_constraint_1 },
0, 0, /* No default value */
"abs-pattern-info"
},
{ ATF_NOFLAGS, 0, offsetof(struct ABSInformationTDD, numberOfCellSpecificAntennaPorts),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_numberOfCellSpecificAntennaPorts_3,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"numberOfCellSpecificAntennaPorts"
},
{ ATF_NOFLAGS, 0, offsetof(struct ABSInformationTDD, measurement_subset),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_BIT_STRING,
0,
{ 0, &asn_PER_memb_measurement_subset_constr_8, memb_measurement_subset_constraint_1 },
0, 0, /* No default value */
"measurement-subset"
},
{ ATF_POINTER, 1, offsetof(struct ABSInformationTDD, iE_Extensions),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProtocolExtensionContainer_170P105,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"iE-Extensions"
},
};
static const int asn_MAP_ABSInformationTDD_oms_1[] = { 3 };
static const ber_tlv_tag_t asn_DEF_ABSInformationTDD_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ABSInformationTDD_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* abs-pattern-info */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* numberOfCellSpecificAntennaPorts */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* measurement-subset */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
};
asn_SEQUENCE_specifics_t asn_SPC_ABSInformationTDD_specs_1 = {
sizeof(struct ABSInformationTDD),
offsetof(struct ABSInformationTDD, _asn_ctx),
asn_MAP_ABSInformationTDD_tag2el_1,
4, /* Count of tags in the map */
asn_MAP_ABSInformationTDD_oms_1, /* Optional members */
1, 0, /* Root/Additions */
4, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ABSInformationTDD = {
"ABSInformationTDD",
"ABSInformationTDD",
&asn_OP_SEQUENCE,
asn_DEF_ABSInformationTDD_tags_1,
sizeof(asn_DEF_ABSInformationTDD_tags_1)
/sizeof(asn_DEF_ABSInformationTDD_tags_1[0]), /* 1 */
asn_DEF_ABSInformationTDD_tags_1, /* Same as above */
sizeof(asn_DEF_ABSInformationTDD_tags_1)
/sizeof(asn_DEF_ABSInformationTDD_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_ABSInformationTDD_1,
4, /* Elements count */
&asn_SPC_ABSInformationTDD_specs_1 /* Additional specs */
};

View File

@@ -0,0 +1,85 @@
/*
* Copyright 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).
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "../../asnFiles/X2AP-IEs.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#ifndef _ABSInformationTDD_H_
#define _ABSInformationTDD_H_
#include "asn_application.h"
/* Including external dependencies */
#include "BIT_STRING.h"
#include "NativeEnumerated.h"
#include "constr_SEQUENCE.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum ABSInformationTDD__numberOfCellSpecificAntennaPorts {
ABSInformationTDD__numberOfCellSpecificAntennaPorts_one = 0,
ABSInformationTDD__numberOfCellSpecificAntennaPorts_two = 1,
ABSInformationTDD__numberOfCellSpecificAntennaPorts_four = 2
/*
* Enumeration is extensible
*/
} e_ABSInformationTDD__numberOfCellSpecificAntennaPorts;
/* Forward declarations */
struct ProtocolExtensionContainer;
/* ABSInformationTDD */
typedef struct ABSInformationTDD {
BIT_STRING_t abs_pattern_info;
long numberOfCellSpecificAntennaPorts;
BIT_STRING_t measurement_subset;
struct ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ABSInformationTDD_t;
/* Implementation */
/* extern asn_TYPE_descriptor_t asn_DEF_numberOfCellSpecificAntennaPorts_3; // (Use -fall-defs-global to expose) */
extern asn_TYPE_descriptor_t asn_DEF_ABSInformationTDD;
extern asn_SEQUENCE_specifics_t asn_SPC_ABSInformationTDD_specs_1;
extern asn_TYPE_member_t asn_MBR_ABSInformationTDD_1[4];
#ifdef __cplusplus
}
#endif
#endif /* _ABSInformationTDD_H_ */
#include "asn_internal.h"

View File

@@ -0,0 +1,451 @@
/*
* Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
#include <ANY.h>
#include <errno.h>
asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = {
sizeof(ANY_t),
offsetof(ANY_t, _asn_ctx),
ASN_OSUBV_ANY
};
asn_TYPE_operation_t asn_OP_ANY = {
OCTET_STRING_free,
OCTET_STRING_print,
OCTET_STRING_compare,
OCTET_STRING_decode_ber,
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
ANY_encode_xer,
#ifdef ASN_DISABLE_OER_SUPPORT
0,
0,
#else
0,
0,
#endif /* ASN_DISABLE_OER_SUPPORT */
#ifdef ASN_DISABLE_PER_SUPPORT
0, 0, 0, 0,
#else
ANY_decode_uper,
ANY_encode_uper,
ANY_decode_aper,
ANY_encode_aper,
#endif /* ASN_DISABLE_PER_SUPPORT */
0, /* Random fill is not defined for ANY type */
0 /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_ANY = {
"ANY",
"ANY",
&asn_OP_ANY,
0, 0, 0, 0,
{ 0, 0, asn_generic_no_constraint }, /* No constraints */
0, 0, /* No members */
&asn_SPC_ANY_specs,
};
#undef RETURN
#define RETURN(_code) \
do { \
asn_dec_rval_t tmprval; \
tmprval.code = _code; \
tmprval.consumed = consumed_myself; \
return tmprval; \
} while(0)
asn_enc_rval_t
ANY_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb,
void *app_key) {
if(flags & XER_F_CANONICAL) {
/*
* Canonical XER-encoding of ANY type is not supported.
*/
ASN__ENCODE_FAILED;
}
/* Dump as binary */
return OCTET_STRING_encode_xer(td, sptr, ilevel, flags, cb, app_key);
}
struct _callback_arg {
uint8_t *buffer;
size_t offset;
size_t size;
};
static int ANY__consume_bytes(const void *buffer, size_t size, void *key);
int
ANY_fromType(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) {
struct _callback_arg arg;
asn_enc_rval_t erval = {0,0,0};
if(!st || !td) {
errno = EINVAL;
return -1;
}
if(!sptr) {
if(st->buf) FREEMEM(st->buf);
st->size = 0;
return 0;
}
arg.offset = arg.size = 0;
arg.buffer = 0;
erval = der_encode(td, sptr, ANY__consume_bytes, &arg);
if(erval.encoded == -1) {
if(arg.buffer) FREEMEM(arg.buffer);
return -1;
}
assert((size_t)erval.encoded == arg.offset);
if(st->buf) FREEMEM(st->buf);
st->buf = arg.buffer;
st->size = arg.offset;
return 0;
}
int
ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) {
uint8_t *buffer = NULL;
ssize_t erval;
if(!st || !td) {
errno = EINVAL;
return -1;
}
if(!sptr) {
if(st->buf) FREEMEM(st->buf);
st->size = 0;
return 0;
}
erval = aper_encode_to_new_buffer(td, td->encoding_constraints.per_constraints, sptr, (void**)&buffer);
if(erval == -1) {
if(buffer) FREEMEM(buffer);
return -1;
}
assert((size_t)erval > 0);
if(st->buf) FREEMEM(st->buf);
st->buf = buffer;
st->size = erval;
return 0;
}
ANY_t *
ANY_new_fromType(asn_TYPE_descriptor_t *td, void *sptr) {
ANY_t tmp;
ANY_t *st;
if(!td || !sptr) {
errno = EINVAL;
return 0;
}
memset(&tmp, 0, sizeof(tmp));
if(ANY_fromType(&tmp, td, sptr)) return 0;
st = (ANY_t *)CALLOC(1, sizeof(ANY_t));
if(st) {
*st = tmp;
return st;
} else {
FREEMEM(tmp.buf);
return 0;
}
}
ANY_t *
ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr) {
ANY_t tmp;
ANY_t *st;
if(!td || !sptr) {
errno = EINVAL;
return 0;
}
memset(&tmp, 0, sizeof(tmp));
if(ANY_fromType_aper(&tmp, td, sptr)) return 0;
st = (ANY_t *)CALLOC(1, sizeof(ANY_t));
if(st) {
*st = tmp;
return st;
} else {
FREEMEM(tmp.buf);
return 0;
}
}
int
ANY_to_type(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) {
asn_dec_rval_t rval;
void *newst = 0;
if(!st || !td || !struct_ptr) {
errno = EINVAL;
return -1;
}
if(st->buf == 0) {
/* Nothing to convert, make it empty. */
*struct_ptr = (void *)0;
return 0;
}
rval = ber_decode(0, td, (void **)&newst, st->buf, st->size);
if(rval.code == RC_OK) {
*struct_ptr = newst;
return 0;
} else {
/* Remove possibly partially decoded data. */
ASN_STRUCT_FREE(*td, newst);
return -1;
}
}
int
ANY_to_type_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) {
asn_dec_rval_t rval;
void *newst = 0;
if(!st || !td || !struct_ptr) {
errno = EINVAL;
return -1;
}
if(st->buf == 0) {
/* Nothing to convert, make it empty. */
*struct_ptr = (void *)0;
return 0;
}
rval = aper_decode(0, td, (void **)&newst, st->buf, st->size, 0, 0);
if(rval.code == RC_OK) {
*struct_ptr = newst;
return 0;
} else {
/* Remove possibly partially decoded data. */
ASN_STRUCT_FREE(*td, newst);
return -1;
}
}
static int ANY__consume_bytes(const void *buffer, size_t size, void *key) {
struct _callback_arg *arg = (struct _callback_arg *)key;
if((arg->offset + size) >= arg->size) {
size_t nsize = (arg->size ? arg->size << 2 : 16) + size;
void *p = REALLOC(arg->buffer, nsize);
if(!p) return -1;
arg->buffer = (uint8_t *)p;
arg->size = nsize;
}
memcpy(arg->buffer + arg->offset, buffer, size);
arg->offset += size;
assert(arg->offset < arg->size);
return 0;
}
#ifndef ASN_DISABLE_PER_SUPPORT
asn_dec_rval_t
ANY_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr,
asn_per_data_t *pd) {
const asn_OCTET_STRING_specifics_t *specs =
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_ANY_specs;
size_t consumed_myself = 0;
int repeat;
ANY_t *st = (ANY_t *)*sptr;
(void)opt_codec_ctx;
(void)constraints;
/*
* Allocate the structure.
*/
if(!st) {
st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) RETURN(RC_FAIL);
}
ASN_DEBUG("UPER Decoding ANY type");
st->size = 0;
do {
ssize_t raw_len;
ssize_t len_bytes;
ssize_t len_bits;
void *p;
int ret;
/* Get the PER length */
raw_len = uper_get_length(pd, -1, 0, &repeat);
if(raw_len < 0) RETURN(RC_WMORE);
if(raw_len == 0 && st->buf) break;
ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len,
repeat ? "repeat" : "once", td->name);
len_bytes = raw_len;
len_bits = len_bytes * 8;
p = REALLOC(st->buf, st->size + len_bytes + 1);
if(!p) RETURN(RC_FAIL);
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
if(ret < 0) RETURN(RC_WMORE);
consumed_myself += len_bits;
st->size += len_bytes;
} while(repeat);
st->buf[st->size] = 0; /* nul-terminate */
RETURN(RC_OK);
}
asn_enc_rval_t
ANY_encode_uper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const void *sptr,
asn_per_outp_t *po) {
const ANY_t *st = (const ANY_t *)sptr;
asn_enc_rval_t er = {0, 0, 0};
const uint8_t *buf;
size_t size;
int ret;
(void)constraints;
if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED;
buf = st->buf;
size = st->size;
do {
int need_eom = 0;
ssize_t may_save = uper_put_length(po, size, &need_eom);
if(may_save < 0) ASN__ENCODE_FAILED;
ret = per_put_many_bits(po, buf, may_save * 8);
if(ret) ASN__ENCODE_FAILED;
buf += may_save;
size -= may_save;
assert(!(may_save & 0x07) || !size);
if(need_eom && uper_put_length(po, 0, 0))
ASN__ENCODE_FAILED; /* End of Message length */
} while(size);
ASN__ENCODED_OK(er);
}
asn_dec_rval_t
ANY_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, void **sptr,
asn_per_data_t *pd) {
const asn_OCTET_STRING_specifics_t *specs =
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_SPC_ANY_specs;
size_t consumed_myself = 0;
int repeat;
ANY_t *st = (ANY_t *)*sptr;
(void)opt_codec_ctx;
(void)constraints;
/*
* Allocate the structure.
*/
if(!st) {
st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size));
if(!st) RETURN(RC_FAIL);
}
ASN_DEBUG("APER Decoding ANY type");
st->size = 0;
do {
ssize_t raw_len;
ssize_t len_bytes;
ssize_t len_bits;
void *p;
int ret;
/* Get the PER length */
raw_len = aper_get_length(pd, -1, 0, &repeat);
if(raw_len < 0) RETURN(RC_WMORE);
if(raw_len == 0 && st->buf) break;
ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len,
repeat ? "repeat" : "once", td->name);
len_bytes = raw_len;
len_bits = len_bytes * 8;
p = REALLOC(st->buf, st->size + len_bytes + 1);
if(!p) RETURN(RC_FAIL);
st->buf = (uint8_t *)p;
ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
if(ret < 0) RETURN(RC_WMORE);
consumed_myself += len_bits;
st->size += len_bytes;
} while(repeat);
st->buf[st->size] = 0; /* nul-terminate */
RETURN(RC_OK);
}
asn_enc_rval_t
ANY_encode_aper(const asn_TYPE_descriptor_t *td,
const asn_per_constraints_t *constraints, const void *sptr,
asn_per_outp_t *po) {
const ANY_t *st = (const ANY_t *)sptr;
asn_enc_rval_t er = {0, 0, 0};
const uint8_t *buf;
size_t size;
int ret;
(void)constraints;
if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED;
buf = st->buf;
size = st->size;
do {
int need_eom = 0;
ssize_t may_save = uper_put_length(po, size, &need_eom);
if(may_save < 0) ASN__ENCODE_FAILED;
ret = per_put_many_bits(po, buf, may_save * 8);
if(ret) ASN__ENCODE_FAILED;
buf += may_save;
size -= may_save;
assert(!(may_save & 0x07) || !size);
if(need_eom && uper_put_length(po, 0, 0))
ASN__ENCODE_FAILED; /* End of Message length */
} while(size);
ASN__ENCODED_OK(er);
}
#endif /* ASN_DISABLE_PER_SUPPORT */

View File

@@ -0,0 +1,66 @@
/*-
* Copyright (c) 2004-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef ASN_TYPE_ANY_H
#define ASN_TYPE_ANY_H
#include <OCTET_STRING.h> /* Implemented via OCTET STRING type */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ANY {
uint8_t *buf; /* BER-encoded ANY contents */
int size; /* Size of the above buffer */
asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */
} ANY_t;
extern asn_TYPE_descriptor_t asn_DEF_ANY;
extern asn_TYPE_operation_t asn_OP_ANY;
extern asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs;
asn_struct_free_f ANY_free;
asn_struct_print_f ANY_print;
ber_type_decoder_f ANY_decode_ber;
der_type_encoder_f ANY_encode_der;
xer_type_encoder_f ANY_encode_xer;
per_type_decoder_f ANY_decode_uper;
per_type_encoder_f ANY_encode_uper;
per_type_decoder_f ANY_decode_aper;
per_type_encoder_f ANY_encode_aper;
#define ANY_free OCTET_STRING_free
#define ANY_print OCTET_STRING_print
#define ANY_compare OCTET_STRING_compare
#define ANY_constraint asn_generic_no_constraint
#define ANY_decode_ber OCTET_STRING_decode_ber
#define ANY_encode_der OCTET_STRING_encode_der
#define ANY_decode_xer OCTET_STRING_decode_xer_hex
/******************************
* Handy conversion routines. *
******************************/
/* Convert another ASN.1 type into the ANY. This implies DER encoding. */
int ANY_fromType(ANY_t *, asn_TYPE_descriptor_t *td, void *struct_ptr);
int ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr);
ANY_t *ANY_new_fromType(asn_TYPE_descriptor_t *td, void *struct_ptr);
ANY_t *ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr);
/* Convert the contents of the ANY type into the specified type. */
int ANY_to_type(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr);
int ANY_to_type_aper(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr);
#define ANY_fromBuf(s, buf, size) OCTET_STRING_fromBuf((s), (buf), (size))
#define ANY_new_fromBuf(buf, size) OCTET_STRING_new_fromBuf( \
&asn_DEF_ANY, (buf), (size))
#ifdef __cplusplus
}
#endif
#endif /* ASN_TYPE_ANY_H */

View File

@@ -0,0 +1,96 @@
/*
* Copyright 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).
*/
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-IEs"
* found in "../../asnFiles/X2AP-IEs.asn"
* `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
*/
#include "AS-SecurityInformation.h"
#include "ProtocolExtensionContainer.h"
asn_TYPE_member_t asn_MBR_AS_SecurityInformation_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct AS_SecurityInformation, key_eNodeB_star),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Key_eNodeB_Star,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"key-eNodeB-star"
},
{ ATF_NOFLAGS, 0, offsetof(struct AS_SecurityInformation, nextHopChainingCount),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_NextHopChainingCount,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"nextHopChainingCount"
},
{ ATF_POINTER, 1, offsetof(struct AS_SecurityInformation, iE_Extensions),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ProtocolExtensionContainer_170P110,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"iE-Extensions"
},
};
static const int asn_MAP_AS_SecurityInformation_oms_1[] = { 2 };
static const ber_tlv_tag_t asn_DEF_AS_SecurityInformation_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_AS_SecurityInformation_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* key-eNodeB-star */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nextHopChainingCount */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
};
asn_SEQUENCE_specifics_t asn_SPC_AS_SecurityInformation_specs_1 = {
sizeof(struct AS_SecurityInformation),
offsetof(struct AS_SecurityInformation, _asn_ctx),
asn_MAP_AS_SecurityInformation_tag2el_1,
3, /* Count of tags in the map */
asn_MAP_AS_SecurityInformation_oms_1, /* Optional members */
1, 0, /* Root/Additions */
3, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_AS_SecurityInformation = {
"AS-SecurityInformation",
"AS-SecurityInformation",
&asn_OP_SEQUENCE,
asn_DEF_AS_SecurityInformation_tags_1,
sizeof(asn_DEF_AS_SecurityInformation_tags_1)
/sizeof(asn_DEF_AS_SecurityInformation_tags_1[0]), /* 1 */
asn_DEF_AS_SecurityInformation_tags_1, /* Same as above */
sizeof(asn_DEF_AS_SecurityInformation_tags_1)
/sizeof(asn_DEF_AS_SecurityInformation_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_AS_SecurityInformation_1,
3, /* Elements count */
&asn_SPC_AS_SecurityInformation_specs_1 /* Additional specs */
};

Some files were not shown because too many files have changed in this diff Show More