aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/dmaap/bc_interface.robot
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2022-12-21 08:56:10 +0000
committerAndreas Geissler <andreas-geissler@telekom.de>2023-01-31 16:25:13 +0000
commit723a2af2407651d5176984321a462bfd8ede2c11 (patch)
treedec50cc42bf1c3ebe7ee7f6e4ceaadeb17c5f303 /robot/resources/dmaap/bc_interface.robot
parent99507033a51c4dfbabc6372c29f43300947be5d6 (diff)
[DMAAP] Fix dmaap interface endpoints
Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I6ed81e4eebdeb4825926a3552b5dec2cd50129f2 Issue-ID: DMAAP-1573
Diffstat (limited to 'robot/resources/dmaap/bc_interface.robot')
-rw-r--r--robot/resources/dmaap/bc_interface.robot35
1 files changed, 35 insertions, 0 deletions
diff --git a/robot/resources/dmaap/bc_interface.robot b/robot/resources/dmaap/bc_interface.robot
new file mode 100644
index 00000000..b57c67d5
--- /dev/null
+++ b/robot/resources/dmaap/bc_interface.robot
@@ -0,0 +1,35 @@
+*** Settings ***
+Documentation The main interface for interacting with Bus Controller.
+Library RequestsLibrary
+
+Resource global_properties.robot
+
+*** Variables ***
+${BC_HEALTH_CHECK_PATH} /webapi/dmaap
+${DMAAP_BC_ENDPOINT} ${GLOBAL_BC_SERVER_PROTOCOL}://${GLOBAL_INJECTED_BC_IP_ADDR}:${GLOBAL_BC_HTTPS_SERVER_PORT}
+
+
+*** Keywords ***
+Run BC Health Check With Basic Auth
+ [Documentation] Runs dmaap details check
+ ${resp}= Return dmaap details with basic auth ${BC_HEALTH_CHECK_PATH}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+
+Return dmaap details with basic auth
+ [Documentation] Runs Bus Controller get details request with basic authentication
+ [Arguments] ${data_path}
+ ${auth}= Create List ${GLOBAL_BC_USERNAME} ${GLOBAL_BC_PASSWORD}
+ ${session}= Create Session bs ${DMAAP_BC_ENDPOINT} auth=${auth}
+ ${resp}= Get Request bs ${data_path}
+ Log Received response from bus controller ${resp.text}
+ [Return] ${resp}
+
+Delete MR topic
+ [Documentation] Runs Bus Controller to remove topic
+ [Arguments] ${data_path}
+ ${auth}= Create List ${GLOBAL_BC_USERNAME} ${GLOBAL_BC_PASSWORD}
+ ${session}= Create Session bs ${DMAAP_BC_ENDPOINT} auth=${auth}
+ ${resp}= Delete Request bs ${data_path}
+ Log Received response from bus controller ${resp.status_code}
+ [Return] ${resp} \ No newline at end of file