X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric_robot_suite%2Frobot%2Fresources%2Frtmgr%2Frtmgr_interface.robot;fp=ric_robot_suite%2Frobot%2Fresources%2Frtmgr%2Frtmgr_interface.robot;h=544a23e735b62c4977d466f4eb6ad32a443ba90b;hb=c5fa07bcd8cbd614bcd813cac698385b789bcfcb;hp=0000000000000000000000000000000000000000;hpb=59f84608ec15c016958a6e0e0ddd813f376c0925;p=it%2Ftest.git diff --git a/ric_robot_suite/robot/resources/rtmgr/rtmgr_interface.robot b/ric_robot_suite/robot/resources/rtmgr/rtmgr_interface.robot new file mode 100644 index 0000000..544a23e --- /dev/null +++ b/ric_robot_suite/robot/resources/rtmgr/rtmgr_interface.robot @@ -0,0 +1,32 @@ +*** Settings *** +Documentation The main interface for interacting with Routing Manager (RtMgr) . It handles low level stuff like managing the http request library and RtMgr required fields + +Library RequestsLibrary +Library UUID + +Resource ../global_properties.robot +Resource ../json_templater.robot + +*** Variables *** +${RTMGR_BASE_PATH} /v1 +${RTMGR_ENDPOINT} ${GLOBAL_RTMGR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_RTMGR_IP_ADDR}:${GLOBAL_RTMGR_SERVER_PORT} + + +*** Keywords *** +Run RtMgr Health Check + [Documentation] Runs RtMgr Health check + ${data_path}= Set Variable ${RTMGR_BASE_PATH}/health + ${resp}= Run Keyword Run RtMgr Get Request ${data_path} + + +Run RtMgr Get Request + [Documentation] Runs RtMgr Get request + [Arguments] ${data_path} + ${auth}= Create List ${GLOBAL_INJECTED_RTMGR_USER} ${GLOBAL_INJECTED_RTMGR_PASSWORD} + ${session}= Create Session rtmgr ${RTMGR_ENDPOINT} auth=${auth} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request rtmgr ${data_path} headers=${headers} + Log Received response from RtMgr ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp}