summaryrefslogtreecommitdiffstats
path: root/robot/resources/clamp_interface.robot
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2019-01-16 09:03:42 -0500
committerBrian Freeman <bf1936@att.com>2019-01-16 09:03:58 -0500
commit86805fe196290648e7e3c40ec834d32dcc115691 (patch)
tree610b76982bb785c529fea7fdae98d9e915a5115b /robot/resources/clamp_interface.robot
parent7037e5424c7898ce202096344f02ac3e4b9a897e (diff)
Add CLAMP GET functions
Issue-ID: INT-808 Change-Id: I0f018725b9590bb8098c7687c62e95d77dbc195d Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'robot/resources/clamp_interface.robot')
-rw-r--r--robot/resources/clamp_interface.robot33
1 files changed, 29 insertions, 4 deletions
diff --git a/robot/resources/clamp_interface.robot b/robot/resources/clamp_interface.robot
index 0adabd73..29365c0c 100644
--- a/robot/resources/clamp_interface.robot
+++ b/robot/resources/clamp_interface.robot
@@ -7,19 +7,44 @@ Resource global_properties.robot
*** Variables ***
${CLAMP_HEALTH_CHECK_PATH} /restservices/clds/v1/healthcheck
${CLAMP_ENDPOINT} ${GLOBAL_CLAMP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CLAMP_IP_ADDR}:${GLOBAL_CLAMP_SERVER_PORT}
+${CLAMP_BASE_PATH} /restservices/clds/v1
+${CLAMP_CLIENT_KEY} robot/assets/keys/org.onap.clamp.key.clear.pem
+${CLAMP_CLIENT_CERT} robot/assets/keys/org.onap.clamp.cert.pem
*** Keywords ***
+Run CLAMP Get Control Loop
+ [Documentation] runs CLAMP Open Control Loop based on model name
+ [Arguments] ${model_name}
+ ${data_path}= Set Variable ${CLAMP_BASE_PATH}/clds/model-names
+ ${resp}= Run Clamp HTTPS Get Request ${data_path}
+
+Run CLAMP Get Model Names
+ [Documentation] runs CLAMP Get Model Names
+ ${data_path}= Set Variable ${CLAMP_BASE_PATH}/clds/model-names
+ ${resp}= Run Clamp HTTPS Get Request ${data_path}
+
Run CLAMP Health Check
[Documentation] Runs CLAMP Health check
${resp}= Run CLAMP Get Request ${CLAMP_HEALTH_CHECK_PATH}
- Should Be Equal As Integers ${resp.status_code} 200
+ Should Be Equal As Integers ${resp.status_code} 200
+
+Run CLAMP HTTPS Get Request
+ [Documentation] Runs CLAMP HTTPS Get request
+ [Arguments] ${data_path}
+ @{client_certs}= Create List ${CLAMP_CLIENT_CERT} ${CLAMP_CLIENT_KEY}
+ ${session}= Create Client Cert Session session ${CLAMP_ENDPOINT} client_certs=@{client_certs}
+ ${resp}= Get Request session ${data_path}
+ Should Be Equal As Integers ${resp.status_code} 200
+ Log Received response from CLAMP ${resp.text}
+ [Return] ${resp}
Run CLAMP Get Request
[Documentation] Runs CLAMP Get request
[Arguments] ${data_path}
- ${session}= Create Session session ${CLAMP_ENDPOINT}
- ${resp}= Get Request session ${data_path}
- Should Be Equal As Integers ${resp.status_code} 200
+ ${session}= Create Session session ${CLAMP_ENDPOINT}
+ ${resp}= Get Request session ${data_path}
+ Should Be Equal As Integers ${resp.status_code} 200
Log Received response from CLAMP ${resp.text}
[Return] ${resp}
+