Enhance mso_interface.robot
Adding POST request to MSO interface.
Issue: TEST-51
Change-Id: Ia70333b8ba61337db9df09ed77665f83ed52fbbc
Signed-off-by: Mor Dabastany <mor.dabastany@amdocs.com>
diff --git a/robot/resources/mso_interface.robot b/robot/resources/mso_interface.robot
index cf6aa64..3e983e8 100644
--- a/robot/resources/mso_interface.robot
+++ b/robot/resources/mso_interface.robot
@@ -51,5 +51,13 @@
Log Received response from mso ${resp.text}
[Return] ${resp}
-
-
+Run MSO Post request
+ [Documentation] Runs an MSO post request
+ [Arguments] ${data_path} ${data}
+ ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
+ Log Creating session ${MSO_ENDPOINT}
+ ${session}= Create Session mso ${MSO_ENDPOINT} auth=${auth}
+ ${uuid}= Generate UUID
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
+ ${resp}= Post Request mso ${data_path} data=${data} headers=${headers}
+ [Return] ${resp}