2 Documentation Scheduler keywords
4 #Library StringTemplater
6 Library ../attlibs/UID.py
7 Library ../attlibs/StringTemplater.py
11 Resource scheduler_common.robot
12 Resource json_templater.robot
15 ${TEMPLATES} assets/templates/changemanagement
16 ${UTC} %Y-%m-%dT%H:%M:%SZ
19 Wait For Pending Approval
20 [Documentation] Gets the schedule identified by the uuid and checks if it is in the Pending Approval state
21 [Arguments] ${uuid} ${status}=Pending Approval
22 ${resp}= Get Change Management auth schedules/${uuid}
23 ${json}= Catenate ${resp.json()}
24 Dictionary Should Contain Item ${resp.json()} status ${status}
27 [Documentation] Sends an approval post request for the given schedule using the UUID and User given and checks that request worked
28 [Arguments] ${uuid} ${user} ${status}
29 ${approval}= Create Dictionary approvalUserId=${user} approvalType=Tier 2 approvalStatus=${status}
30 ${resp}= Post Change Management auth schedules/${uuid}/approvals data=${approval}
31 Should Be Equal As Strings ${resp.status_code} 204
35 [Arguments] ${uuid} ${user}
36 ${approval}= Create Dictionary approvalUserId=${user} approvalType=Tier 3 approvalStatus=Accepted
37 Run Keyword and Expect Error 400 Post Change Management auth schedules/${uuid}/approvals data=${approval}