This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
MSO-LO-LCM-RANO-Workflow.robot
139 lines (128 loc) · 5.96 KB
/
MSO-LO-LCM-RANO-Workflow.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
*** Settings ***
Resource environment/variables.robot
Variables ${SCHEMAS_PATH}
Resource NSLCMOperationKeywords.robot
Resource NFVOOperationKeywords.robot
Library REST ${MSO-LO_BASE_API}
Library OperatingSystem
Library JSONLibrary
Library JSONSchemaLibrary schemas/
*** Test Cases ***
POST NS Instance Creation
[Tags] instantiate-terminate-workflow
[Documentation] Test ID: mso-lo-test-3.2
... Test title: POST NS Instance Creation
... Test objective: The objective is to test the workflow for Creating a NS instance
... Pre-conditions: none
... Post-Conditions: The NS lifecycle management operation occurrence is in NOT_ISTANTIATED state
POST New nsInstance
Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location
Check HTTP Response Body Json Schema Is ${ns_schema}
Check NS Id
Run Keyword If "${apiRoot}" == "nfvo"
... Check VNF Ids
... ELSE IF "${apiRoot}" == "rano"
... Log No vnfInstance with rano
... ELSE
... Fatal Error Unknown value for variable apiRoot
Check resource not_instantiated
GET NS Instance List
[Tags] instantiate-terminate-workflow
[Documentation] Test ID: mso-lo-test-3.1
... Test title: GET NS Instance List
... Test objective: The objective is to test the workflow for retriving the NS instance list
... Pre-conditions: none
... Post-Conditions: none
GET NsInstances
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ${ns_list_schema}
GET Information about an individual NS Instance
[Tags] instantiate-terminate-workflow
[Documentation] Test ID: mso-lo-test-3.3
... Test title: GET Information about an individual NS Instance
... Test objective: The objective is to test that GET method returns an individual NS instance
... Pre-conditions: none
... Post-Conditions: none
GET IndividualNSInstance
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ${ns_schema}
POST NS Instance Instantiate
[Tags] instantiate-terminate-workflow
[Documentation] Test ID: mso-lo-test-3.4
... Test title: POST NS Instance Instantiate
... Test objective: The objective is to test the workflow for Instantiate a NS instance
... Pre-conditions: the resource is in NOT_INSTANTIATED state
... Post-Conditions: status code 202
Check resource existence
Check resource not_instantiated
Run Keyword If "${apiRoot}" == "nfvo"
... POST Instantiate nsInstance with vnf/vld in additionalParamsForNs
... ELSE IF "${apiRoot}" == "rano"
... POST Instantiate nsInstance with SapData
... ELSE
... Fatal Error Unknown value for variable apiRoot
Check HTTP Response Status Code Is 202
Check HTTP Response Header Contains Location
Check Operation Occurrence Id
GET NS LCM OP Occurrence Instantiate COMPLETED
[Tags] instantiate-terminate-workflow
[Documentation] Test ID: mso-lo-test-3.6
... Test title: GET NS LCM OP Occurrence Instantiate COMPLETED
... Test objective: The objective is to test the workflow for retrive NS LCM OP Occurrence
... Pre-conditions: none
... Post-Conditions: status code 200
Wait Until Keyword Succeeds ${MAX_WAIT} ${INTERVAL_WAIT} Run Keywords
... GET Individual NS LCM OP Occurrence
... AND Check resource operationState is COMPLETED
GET NS LCM OP Occurrences
[Tags] instantiate-terminate-workflow
[Documentation] Test ID: mso-lo-test-3.5
... Test title: GET LCM OP Occurrences
... Test objective: The objective is to test the workflow for retrive NS LCM OP Occurrences
... Pre-conditions: none
... Post-Conditions: status code 200
GET NS LCM OP Occurrences
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is ${ns_lcm_op_occ_list_schema}
POST NS Instance Terminate
[Tags] instantiate-terminate-workflow
[Documentation] Test ID: mso-lo-test-3.
... Test title: POST Terminate NS Instance
... Test objective: The objective is to test the workflow for Terminate a NS instance
... Pre-conditions: the resource is in INSTANTIATED state
... Post-Conditions: the resource is in NOT_INSTANTIATED state
Check resource existence
Check resource instantiated
POST Terminate NSInstance
Check HTTP Response Status Code Is 202
Check Operation Occurrence Id
POST NS Instance Delete
[Tags] instantiate-terminate-workflow
[Documentation] Test ID: mso-lo-test-3.6
... Test title: POST NS Instance Delete
... Test objective: The objective is to test the workflow for Deleting a NS instance
... Pre-conditions: the resource is in NOT_INSTANTIATED state
... Post-Conditions: status code 204
Sleep 5s
Check resource not_instantiated
DELETE IndividualNSInstance
Check HTTP Response Status Code Is 204
POST NS Instance Creation Bad Request
[Tags] standalone
[Documentation] Test ID: mso-lo-test-3.2.1
... Test title: POST Instance Creation Bad Request
... Test objective: The objective is to test the workflow for Creating a NS instance with a bad request
... Pre-conditions: none
... Post-Conditions: Status code 400
POST New nsInstance with invalid request body
Check HTTP Response Status Code Is 400
GET Information about an inexistent individual NS Instance
[Tags] standalone
[Documentation] Test ID: mso-lo-test-3.3.1
... Test title: GET Information about an inexistent individual NS Instance
... Test objective: The objective is to test that GET method returns an inexistent individual NS instance
... Pre-conditions: none
... Post-Conditions: Status code 404
GET IndividualNSInstance inexistent
Check HTTP Response Status Code Is 404