From 0b477ebe952a088c278482f2d30b843559266a37 Mon Sep 17 00:00:00 2001 From: Jerry Flood Date: Tue, 26 Mar 2019 13:55:08 -0400 Subject: Updates to support create API changes Issue-ID: OPTFRA-458 Change-Id: Ia4dcb0e0282bfa35379c580ab2afa2f522f83e01 Signed-off-by: Jerry Flood --- .../resources/scheduler_requests/create_schedule.robot | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'cmso-robot/robot/resources') 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} -- cgit