First commit

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

View File

@@ -0,0 +1,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