summaryrefslogtreecommitdiffstats
path: root/robot/resources
diff options
context:
space:
mode:
authorJack Lucas <jflos@sonoris.net>2021-03-06 13:54:40 -0500
committerMorgan Richomme <morgan.richomme@orange.com>2021-03-24 14:00:59 +0000
commit72885bb25ecb5fac935e27a34df6b3b3860e7115 (patch)
tree51ba8a1b9e0f3d678e4ed32507a397a973db8524 /robot/resources
parent814032fe8070641a4ee760689b9e282c2b777a8a (diff)
Add DCAE Microservice Health Check
Issue-ID: DCAEGEN2-2660 Signed-off-by: Jack Lucas <jflos@sonoris.net> Change-Id: I0f7488008e7595e493176138b5f449b33ddb0f1b
Diffstat (limited to 'robot/resources')
-rw-r--r--robot/resources/dcae_ms_interface.robot24
1 files changed, 24 insertions, 0 deletions
diff --git a/robot/resources/dcae_ms_interface.robot b/robot/resources/dcae_ms_interface.robot
new file mode 100644
index 00000000..a32bdcf8
--- /dev/null
+++ b/robot/resources/dcae_ms_interface.robot
@@ -0,0 +1,24 @@
+*** Settings ***
+Documentation The main interface for interacting with DCAE Helm-deployed microservices. It handles low level stuff like managing the http request library and DCAE required fields
+Library RequestsLibrary
+Library ONAPLibrary.Utilities
+Library OperatingSystem
+Library Collections
+Resource global_properties.robot
+
+*** Variables ***
+${DCAE_MS_HEALTH_CHECK_PATH} /healthcheck
+${DCAE_MS_HEALTH_ENDPOINT} ${GLOBAL_DCAE_MS_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DCAE_MS_IP_ADDR}:${GLOBAL_DCAE_MS_HEALTH_SERVER_PORT}
+
+*** Keywords ***
+Run DCAE Microservices Health Check
+ [Documentation] Runs a DCAE Microservices health check
+ ${auth}= Create List ${GLOBAL_DCAE_MS_USERNAME} ${GLOBAL_DCAE_MS_PASSWORD}
+ Log Creating session ${DCAE_MS_HEALTH_ENDPOINT}
+ ${session}= Create Session dcae ${DCAE_MS_HEALTH_ENDPOINT} auth=${auth}
+ ${uuid}= Generate UUID4
+ ${headers}= Create Dictionary X-ECOMP-Client-Version=ONAP-R2 action=getTable Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
+ ${resp}= Get Request dcae ${DCAE_MS_HEALTH_CHECK_PATH} headers=${headers}
+ Log Received response code from dcae ${resp}
+ Log Received content from dcae ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200