summaryrefslogtreecommitdiffstats
path: root/robot/resources/sdnc_interface.robot
diff options
context:
space:
mode:
authordeswali07 <biswajit.deswali@amdocs.com>2020-09-10 15:47:47 +0530
committerMorgan Richomme <morgan.richomme@orange.com>2020-09-22 15:53:59 +0000
commitdd3042596c65fc5786dac3b62fd24ae0e7a84b9d (patch)
treead9d91dc5187d0ce7e7f01fbf8d72946d0a89b9b /robot/resources/sdnc_interface.robot
parent1493f1d215984d960e80c37cb1e68a82b5020ec0 (diff)
SDNC new Healthcheck TC
Issue-ID: SDNC-1349 Change-Id: I2c44e5e470950c7592a74d24ff117f9df79ff4ec Signed-off-by: deswali07 <biswajit.deswali@amdocs.com>
Diffstat (limited to 'robot/resources/sdnc_interface.robot')
-rw-r--r--robot/resources/sdnc_interface.robot27
1 files changed, 27 insertions, 0 deletions
diff --git a/robot/resources/sdnc_interface.robot b/robot/resources/sdnc_interface.robot
index d8a73cf2..2e714217 100644
--- a/robot/resources/sdnc_interface.robot
+++ b/robot/resources/sdnc_interface.robot
@@ -28,6 +28,9 @@ ${SDNC_ADMIN_ENDPOINT} ${GLOBAL_SDNC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_SDN
${SDNC_ADMIN_SIGNUP_URL} ${SDNC_ADMIN_ENDPOINT}/signup
${SDNC_ADMIN_LOGIN_URL} ${SDNC_ADMIN_ENDPOINT}/login
${SDNC_ADMIN_VNF_PROFILE_URL} ${SDNC_ADMIN_ENDPOINT}/mobility/getVnfProfile
+${GRAPI_SIPath} ${SDNC_INDEX_PATH}/config/GENERIC-RESOURCE-API:services/service/${GR_SI}
+${Data_GRAPI} { "service": [ { "service-instance-id": "GRSIdummy123" } ] }
+${GR_SI} GRSIdummy123
*** Keywords ***
Run SDNC Health Check
@@ -36,6 +39,30 @@ Run SDNC Health Check
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['output']['response-code']} 200
+Run SDNC Health Check Generic Resource API
+ [Documentation] Runs an GENERIC-RESOURCE-API API check for SDNC healthcheck
+ ${delete_response} Run SDNC Delete Request ${GRAPI_SIPath}
+ #Put Dummy data
+ ${Put_resp}= SDNC.Run Put Request ${SDNC_REST_ENDPOINT} ${GRAPI_SIPath} data=${Data_GRAPI} auth=${GLOBAL_SDNC_AUTHENTICATION}
+ Should Be Equal As Strings ${Put_resp.status_code} 201
+ #Get request and validation
+ ${resp}= SDNC.Run Get Request ${SDNC_REST_ENDPOINT} ${GRAPI_SIPath} auth=${GLOBAL_SDNC_AUTHENTICATION}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${res_body}= Convert to string ${resp.content}
+ Should contain ${res_body} ${GR_SI}
+ #Delete Dummy Data
+ ${delete_response} Run SDNC Delete Request ${GRAPI_SIPath}
+ Should Be Equal As Strings ${delete_response.status_code} 200
+
+Run SDNC Delete Request
+ [Documentation] Runs an SDNC Delete Request
+ [Arguments] ${URL}
+ Disable Warnings
+ ${session}= Create Session SDNC ${SDNC_REST_ENDPOINT} auth=${GLOBAL_SDNC_AUTHENTICATION}
+ ${headers}= Create Dictionary Accept=*/* Accept-Encoding=gzip, deflate, br Connection=keep-alive
+ ${resp}= Delete Request SDNC ${URL} data=${None} headers=${headers}
+ [Return] ${resp}
+
Preload Vcpe Networks
Preload Network cpe_public 10.2.0.2 10.2.0.1
Preload Network cpe_signal 10.4.0.2 10.4.0.1