summaryrefslogtreecommitdiffstats
path: root/robot/resources/oof_interface.robot
diff options
context:
space:
mode:
authorvrvarma <vv8305@att.com>2019-04-29 12:13:45 -0400
committervrvarma <vv8305@att.com>2019-04-29 12:59:21 -0400
commit4ecc3a7ddb44cb3b64b140f9cf0ab27af3a96aef (patch)
treeefb318036f13e6c29e278d48c1819828c3f59161 /robot/resources/oof_interface.robot
parentb339295676ea37cc1037cedeaf8c6fc7a7bd62fe (diff)
Create OOM based CSIT for OSDF
Adding CSIT test cases for OSDF for homing and pci-opt Change-Id: I6ad770ef12d8c90373fd7e8b97091a262f1d241a Signed-off-by: vrvarma <vv8305@att.com> Issue-ID: OPTFRA-450
Diffstat (limited to 'robot/resources/oof_interface.robot')
-rw-r--r--robot/resources/oof_interface.robot26
1 files changed, 26 insertions, 0 deletions
diff --git a/robot/resources/oof_interface.robot b/robot/resources/oof_interface.robot
index aad06526..7d078ab3 100644
--- a/robot/resources/oof_interface.robot
+++ b/robot/resources/oof_interface.robot
@@ -18,6 +18,7 @@ ${OOF_CMSO_HEALTH_CHECK_PATH} /cmso/v1/health?checkInterfaces=true
${OOF_CMSO_TEMPLATE_FOLDER} robot/assets/templates/cmso
${OOF_CMSO_UTC} %Y-%m-%dT%H:%M:%SZ
${OOF_HOMING_PLAN_FOLDER} robot/assets/templates/optf-has
+${OOF_OSDF_TEMPLATE_FOLDER} robot/assets/templates/optf-osdf
${OOF_HOMING_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_HOMING_IP_ADDR}:${GLOBAL_OOF_HOMING_SERVER_PORT}
${OOF_SNIRO_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_SNIRO_IP_ADDR}:${GLOBAL_OOF_SNIRO_SERVER_PORT}
@@ -164,3 +165,28 @@ OOF-CMSO Json Escape
${json_string}= Evaluate json.dumps(${json}) json
${escaped}= Replace String ${json_string} " \\"
[Return] ${escaped}
+
+Run OOF-OSDF Post Request
+ [Documentation] Runs a scheduler POST request
+ [Arguments] ${data_path} ${data}={} ${auth}
+
+ ${session}= Create Session session ${OOF_OSDF_ENDPOINT} auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Post Request session ${data_path} headers=${headers} data=${data}
+ Log Received response from osdf ${resp.text}
+ [Return] ${resp}
+
+
+Run OOF-OSDF Post Homing
+ [Documentation] Runs a osdf homing request
+ ${auth}= Create List ${GLOBAL_OOF_OSDF_USERNAME} ${GLOBAL_OOF_OSDF_PASSWORD}
+ ${data}= Get Binary File ${OOF_OSDF_TEMPLATE_FOLDER}${/}placement_request.json
+ ${resp}= Run OOF-OSDF Post Request /api/oof/placement/v1 data=${data} auth=${auth}
+ Should Be Equal As Strings ${resp.status_code} 204
+
+Run OOF-OSDF Post PCI-OPT
+ [Documentation] Runs a osdf PCI-OPT request
+ ${auth}= Create List ${GLOBAL_OOF_PCI_USERNAME} ${GLOBAL_OOF_PCI_PASSWORD}
+ ${data}= Get Binary File ${OOF_OSDF_TEMPLATE_FOLDER}${/}pci-opt-request.json
+ ${resp}= Run OOF-OSDF Post Request /api/oof/pci/v1 data=${data} auth=${auth}
+ Should Be Equal As Strings ${resp.status_code} 204