2 Documentation Creates VID VNF Instance
4 #Library StringTemplater
6 Library ../attlibs/UID.py
7 Library ../attlibs/StringTemplater.py
11 Resource scheduler_common.robot
12 Resource json_templater.robot
13 Resource create_schedule.robot
14 Resource approval_requests.robot
17 ${TEMPLATES} /assets/templates
20 Change Management Template
21 [Arguments] ${request_file} ${workflow} ${minutesFromNow}=1
22 ${template_folder}= Catenate ${TEMPLATES}/changemanagement
23 ${uuid}= Generate UUID
24 ${resp}= Create Schedule ${uuid} ${request_file} ${template_folder} workflow=${workflow} minutesFromNow=${minutesFromNow}
25 Should Be Equal as Strings ${resp.status_code} 202
26 Validate Acknowledgment Response Headers ${resp}
27 Wait Until Keyword Succeeds 600s 30s Wait For Pending Approval ${uuid}
28 Send Tier2 Approval ${uuid} jf9860 Accepted
29 ${resp}= Get Change Management auth schedules/${uuid}
30 Wait Until Keyword Succeeds 120s 30s Wait For All VNFs Reach Status Completed ${uuid}
31 Wait Until Keyword Succeeds 120s 30s Wait for Schedule to Complete Completed ${uuid}
32 ${reps}= Delete Change Management auth schedules/${uuid}
34 Change Management Immediate Template
35 [Arguments] ${request_file} ${workflow}
36 ${template_folder}= Catenate ${TEMPLATES}/changemanagement
37 ${uuid}= Generate UUID
38 ${resp}= Create Schedule ${uuid} ${request_file} ${template_folder} workflow=${workflow}
39 Should Be Equal as Strings ${resp.status_code} 202
40 Validate Acknowledgment Response Headers ${resp}
41 Wait Until Keyword Succeeds 120s 30s Wait For All VNFs Reach Status Completed ${uuid}
42 Wait Until Keyword Succeeds 120s 30s Wait for Schedule to Complete Completed ${uuid}
43 ${reps}= Delete Change Management auth schedules/${uuid}
45 Wait For All VNFs Reach Status
46 [Arguments] ${status} ${uuid}
47 ${resp}= Get Change Management auth schedules/scheduleDetails?request.scheduleId=${uuid}
48 : for ${vnf} in @{resp.json()}
49 \ Dictionary Should Contain Item ${vnf} status Completed
51 Wait for Schedule to Complete
52 [Arguments] ${status} ${uuid}
53 ${resp}= Get Change Management auth schedules/${uuid}
54 Dictionary Should Contain Item ${resp.json()} status Completed
57 [Arguments] ${request_file} ${workflow} ${minutesFromNow}=5
58 ${template_folder}= Catenate ${TEMPLATES}/changemanagement
59 ${uuid}= Generate UUID
60 ${resp}= Create Schedule ${uuid} ${request_file} ${template_folder} workflow=${workflow} minutesFromNow=${minutesFromNow}
61 Should Be Equal as Strings ${resp.status_code} 202
62 Validate Acknowledgment Response Headers ${resp}
63 Wait Until Keyword Succeeds 300s 5s Wait For Pending Approval ${uuid}
64 Send Tier2 Approval ${uuid} jf9860 Accepted
66 Change Management Cancel Template
67 [Arguments] ${request_file} ${workflow} ${minutesFromNow}=5
68 ${template_folder}= Catenate ${TEMPLATES}/changemanagement
69 ${uuid}= Generate UUID
70 ${resp}= Create Schedule ${uuid} ${request_file} ${template_folder} workflow=${workflow} minutesFromNow=${minutesFromNow}
71 Should Be Equal as Strings ${resp.status_code} 202
72 Validate Acknowledgment Response Headers ${resp}
73 Wait Until Keyword Succeeds 600s 5s Wait For Pending Approval ${uuid}
74 Send Tier2 Approval ${uuid} jf9860 Accepted
75 ${resp}= Delete Change Management auth schedules/${uuid}
76 Should Be Equal as Strings ${resp.status_code} 204
79 Validate Acknowledgment Response Headers
80 [Arguments] ${Response}
81 Log ${Response.headers}
82 ${act_headers_keys} = Get Dictionary Keys ${Response.headers}
83 Dictionary Should Contain Key ${Response.headers} X-LatestVersion
84 Dictionary Should Contain Key ${Response.headers} X-MinorVersion
85 Dictionary Should Contain Key ${Response.headers} X-PatchVersion
89 Change Management Immediate Template Query Data
90 [Arguments] ${request_file} ${workflow}
91 ${template_folder}= Catenate ${TEMPLATES}/SearchSchedulerDetails
92 ${uuid}= Generate UUID
93 ${resp}= Create Schedule ${uuid} ${request_file} ${template_folder} workflow=${workflow}
94 Should Be Equal as Strings ${resp.status_code} 202
95 Validate Acknowledgment Response Headers ${resp}
96 Wait Until Keyword Succeeds 120s 30s Wait For All VNFs Reach Status Completed ${uuid}
97 Wait Until Keyword Succeeds 120s 30s Wait for Schedule to Complete Completed ${uuid}