aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-robot/robot/resources/scheduler_requests/create_schedule.robot
diff options
context:
space:
mode:
authorJerry Flood <jflood@att.com>2019-03-26 13:55:08 -0400
committerJerry Flood <jflood@att.com>2019-03-26 13:59:08 -0400
commit0b477ebe952a088c278482f2d30b843559266a37 (patch)
tree7d8cbad76ba2509d28aefd2205858b7412bd8320 /cmso-robot/robot/resources/scheduler_requests/create_schedule.robot
parent40ca157ce955a0ee4975b0d41bf5807c0f9a3808 (diff)
Updates to support create API changes
Issue-ID: OPTFRA-458 Change-Id: Ia4dcb0e0282bfa35379c580ab2afa2f522f83e01 Signed-off-by: Jerry Flood <jflood@att.com>
Diffstat (limited to 'cmso-robot/robot/resources/scheduler_requests/create_schedule.robot')
-rw-r--r--cmso-robot/robot/resources/scheduler_requests/create_schedule.robot18
1 files changed, 14 insertions, 4 deletions
diff --git a/cmso-robot/robot/resources/scheduler_requests/create_schedule.robot b/cmso-robot/robot/resources/scheduler_requests/create_schedule.robot
index 44443f8..978d443 100644
--- a/cmso-robot/robot/resources/scheduler_requests/create_schedule.robot
+++ b/cmso-robot/robot/resources/scheduler_requests/create_schedule.robot
@@ -22,9 +22,7 @@ Create Schedule
${testid}= Catenate ${uuid}
${testid}= Get Substring ${testid} -4
${dict}= Create Dictionary serviceInstanceId=${uuid} parent_service_model_name=${uuid}
- ${callbackData}= Fill JSON Template File ${VID_TEMPLATES}/VidCallbackData.json.template ${dict}
- ${callbackDataString}= Json Escape ${callbackData}
- ${map}= Create Dictionary uuid=${uuid} callbackUrl=${GLOBAL_CALLBACK_URL} callbackData=${callbackDataString} testid=${testid} workflow=${workflow} userId=${GLOBAL_CALLBACK_USERID}
+ ${map}= Create Dictionary uuid=${uuid} callbackUrl=${GLOBAL_CALLBACK_URL} testid=${testid} workflow=${workflow} userId=${GLOBAL_CALLBACK_USERID}
${nodelist}= Split String ${NODES} ,
${nn}= Catenate 1
# Support up to 4 ChangeWindows
@@ -36,10 +34,22 @@ Create Schedule
\ ${end_time}= Get Current Date UTC + ${tomorrow} minutes result_format=${UTC}
\ Set To Dictionary ${map} start_time${i}=${start_time} end_time${i}=${end_time}
+ ${requestList}= Create List
+
: For ${vnf} IN @{nodelist}
\ Set To Dictionary ${map} node${nn} ${vnf}
- \ ${nn}= Evaluate ${nn}+1
+ \ ${nn}= Evaluate ${nn}+1
+ \ Set To DIctionary ${dict} vnfName=${vnf}
+ \ ${requestInfo}= Fill JSON Template File ${VID_TEMPLATES}/VidCallbackData.json.template ${dict}
+ \ Append To List ${requestList} ${requestInfo}
+
+
+ ${callBackDataMap}= Create Dictionary requestType=Update requestDetails=${requestList}
+
+ ${callbackDataString}= Json Escape ${callbackDataMap}
+ Log ${callbackDataString}
+ Set To Dictionary ${map} callbackData=${callbackDataString}
${data}= Fill JSON Template File ${TEMPLATES}/${request_file} ${map}
${resp}= Post Change Management auth schedules/${uuid} data=${data}