Add initial codes
[it/test.git] / ric_robot_suite / robot / resources / e2sim / e2sim_tools.robot
1 *** Settings ***
2 Documentation     Routines for managing interactions with the E2 Simulator
3
4 Resource          ../global_properties.robot
5
6 Library           KubernetesEntity  ${NAMESPACE}
7 Library           E2SimUtils        ${DBHOST}     ${DBPORT}
8
9
10 *** Variables ***
11 ${DBHOST}         ${GLOBAL_INJECTED_DBAAS_IP_ADDR}
12 ${DBPORT}         ${GLOBAL_DBAAS_SERVER_PORT}
13 ${NAMESPACE}      %{RICPLT_NAMESPACE}
14 ${PFX}            %{RICPLT_RELEASE_NAME}
15
16 *** Keywords ***
17 Generate RAN Name
18      [Documentation]    Generate a new RAN name suitable for use with E2
19      [Arguments]        ${ran_name_prefix}=${EMPTY}
20      ${resp} =          randomRANName   ${ran_name_prefix}
21      [Return]           ${resp}
22
23 Delete RAN Database Entry
24      [Documentation]                Delete the RNIB record for a specific RAN Name
25      [Arguments]                    ${ran_name}
26      ${gnbs} =                      gNodeBDelete    ${ran_name}
27      Dictionary Should Contain Key  ${gnbs}         ${ran_name}
28
29 Restart E2 Simulator
30      [Documentation]                Restart all E2Sim pods
31      [Arguments]                    ${deployment}=${PFX}-e2sim
32      ${resp} =                      Redeploy        ${deployment}
33      [Return]                       ${resp}