NSDArchiveContent.robot 11.4 KB
Newer Older
1
*** Settings ***
Michele Carignani's avatar
Michele Carignani committed
2
Documentation     This Clause defines the content of the individual NS descriptor, i.e. NSD content
3
Library           JSONSchemaLibrary    schemas/
Elian Kraja's avatar
Elian Kraja committed
4
Resource          environment/variables.txt    # Generic Parameters
Giacomo Bernini's avatar
Giacomo Bernini committed
5
Resource          NSDManagementKeywords.robot
6
Library           JSONLibrary
Elian Kraja's avatar
Elian Kraja committed
7
Library           REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}    ssl_verify=false
8
9
10
Library           OperatingSystem

*** Test Cases ***
11
12
13
14
15
16
17
18
19
20
21
22

Void
     [Documentation]    Test ID: 5.3.1.3.1
    ...    Test title: Void
    ...    Test objective: Void
    ...    Pre-conditions: Void
    ...    Reference: Void
    ...    Config ID: Void
    ...    Applicability: Void
    ...    Post-Conditions: Void
    Void

Giacomo Bernini's avatar
Giacomo Bernini committed
23
24
25
26
27
Get NSD Content in Zip Format
    [Documentation]    Test ID: 5.3.1.3.2
    ...    Test title: Get NSD Content in Zip Format
    ...    Test objective: The objective is to test the retrieval of the NSD Content in zip format and perform a validation that returned content is in zip format
    ...    Pre-conditions: One or more NSDs are onboarded in the NFVO.
Najam UI Hassan's avatar
Najam UI Hassan committed
28
    ...    Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
29
30
31
32
33
34
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get NSD Content in Zip Format
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Content-Type Is    application/zip
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
Void
     [Documentation]    Test ID: 5.3.1.3.3
    ...    Test title: Void
    ...    Test objective: Void
    ...    Pre-conditions: Void
    ...    Reference: Void
    ...    Config ID: Void
    ...    Applicability: Void
    ...    Post-Conditions: Void
    Void

Void
     [Documentation]    Test ID: 5.3.1.3.4
    ...    Test title: Void
    ...    Test objective: Void
    ...    Pre-conditions: Void
    ...    Reference: Void
    ...    Config ID: Void
    ...    Applicability: Void
    ...    Post-Conditions: Void
    Void

Void
     [Documentation]    Test ID: 5.3.1.3.5
    ...    Test title: Void
    ...    Test objective: Void
    ...    Pre-conditions: Void
    ...    Reference: Void
    ...    Config ID: Void
    ...    Applicability: Void
    ...    Post-Conditions: Void
    Void
    
Giacomo Bernini's avatar
Giacomo Bernini committed
69
70
71
72
73
Get NSD Content with invalid resource identifier
    [Documentation]    Test ID: 5.3.1.3.6
    ...    Test title: Get NSD Content with invalid resource identifier
    ...    Test objective: The objective is to test that the retrieval of the NSD Content fails when using an invalid resource identifier
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
74
    ...    Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
75
76
77
78
79
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get NSD Content with invalid resource identifier
    Check HTTP Response Status Code Is    404
80
    Check HTTP Response Body Json Schema Is   ProblemDetails
81

Giacomo Bernini's avatar
Giacomo Bernini committed
82
83
84
85
86
Get NSD Content with conflict due to onboarding state
    [Documentation]    Test ID: 5.3.1.3.7
    ...    Test title: Get NSD Content with conflict due to onboarding state
    ...    Test objective: The objective is to test that the retrieval of the NSD Content fails due to a conflict when the NSD is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: The onboarding state of the NSD for which the NSD Content is requested is different from ONBOARDED.
Najam UI Hassan's avatar
Najam UI Hassan committed
87
    ...    Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
88
89
90
91
92
93
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none 
    Get NSD Content with conflict due to onboarding state
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is   ProblemDetails
94

Giacomo Bernini's avatar
Giacomo Bernini committed
95
96
97
98
99
GET NSD Content with Range Request and NFVO supporting Range Requests
    [Documentation]    Test ID: 5.3.1.3.8
    ...    Test title: GET NSD Content with Range Request and NFVO supporting Range Requests
    ...    Test objective: The objective is to test the retrieval of NSD Content when using a range request to return single range of bytes from the file, with the NFVO supporting it. The test also perform a validation that returned content matches the issued range
    ...    Pre-conditions: One or more NSDs are onboarded in the NFVO.
Najam UI Hassan's avatar
Najam UI Hassan committed
100
    ...    Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
101
102
103
104
105
106
107
108
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The NFVO supports range requests to return single range of bytes from the NSD file
    ...    Post-Conditions: none
    GET NSD Content with Range Request
    Check HTTP Response Status Code Is    206
    Check HTTP Response Header Content-Type Is    application/zip
    Check HTTP Response Header Content-Range Is Present and Matches the requested range
    Check HTTP Response Header Content-Length Is Present and Matches the requested range length
109

Giacomo Bernini's avatar
Giacomo Bernini committed
110
111
112
113
114
GET NSD Content with Range Request and NFVO not supporting Range Requests
    [Documentation]    Test ID: 5.3.1.3.9
    ...    Test title: GET NSD Content with Range Request and NFVO not supporting Range Requests
    ...    Test objective: The objective is to test that the retrieval of NSD Content, when using a range request to return single range of bytes from the file and the NFVO not supporting it, returns the full NSD file.
    ...    Pre-conditions: One or more NSDs are onboarded in the NFVO.
Najam UI Hassan's avatar
Najam UI Hassan committed
115
    ...    Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
116
117
118
119
120
121
122
123
124
125
126
127
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The NFVO does not support range requests to return single range of bytes from the NSD file
    ...    Post-Conditions: none    
    GET NSD Content with Range Request
    Check HTTP Response Status Code Is    200
    Check HTTP Response Header Content-Type Is    application/zip    

GET NSD Content with invalid Range Request
    [Documentation]    Test ID: 5.3.1.3.10
    ...    Test title: GET NSD Content with invalid Range Request
    ...    Test objective: The objective is to test that the retrieval of NSD Content fails when using a range request that does not match any available byte range in the file.
    ...    Pre-conditions: One or more NSDs are onboarded in the NFVO.
Najam UI Hassan's avatar
Najam UI Hassan committed
128
    ...    Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
129
130
131
132
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The NFVO supports range requests to return single range of bytes from the NSD file
    ...    Post-Conditions: none      
    GET NSD Content with invalid Range Request
133
134
    Check HTTP Response Status Code Is    416  
    Check HTTP Response Body Json Schema Is   ProblemDetails   
135
        
Giacomo Bernini's avatar
Giacomo Bernini committed
136
137
138
139
140
Upload NSD Content as Zip file in asynchronous mode
    [Documentation]    Test ID: 5.3.1.3.11
    ...    Test title: Upload NSD Content as Zip file in asynchronous mode
    ...    Test objective: The objective is to test the upload of an NSD Content in Zip format when the NFVO supports the asynchronous upload mode.
    ...    Pre-conditions: One or more NSDs are onboarded in the NFVO.
Najam UI Hassan's avatar
Najam UI Hassan committed
141
    ...    Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
142
    ...    Config ID: Config_prod_NFVO
143
    ...    Applicability: The NFVO supports the upload of NSD contents in asynchronous mode
root's avatar
root committed
144
    ...    Post-Conditions: NSD Uploaded
145
    Send PUT Request to upload NSD Content as zip file in asynchronous mode
Giacomo Bernini's avatar
Giacomo Bernini committed
146
    Check HTTP Response Status Code Is    202
root's avatar
root committed
147
    Check Post Condition NSD Content has been Uploaded
148
149
150
151
152
153
154
155
156
157
158
159
160

Void
     [Documentation]    Test ID: 5.3.1.3.12
    ...    Test title: Void
    ...    Test objective: Void
    ...    Pre-conditions: Void
    ...    Reference: Void
    ...    Config ID: Void
    ...    Applicability: Void
    ...    Post-Conditions: Void
    Void


Giacomo Bernini's avatar
Giacomo Bernini committed
161
162
163
164
165
Upload NSD Content as Zip file in synchronous mode
    [Documentation]    Test ID: 5.3.1.3.13
    ...    Test title: Upload NSD Content as Zip file in synchronous mode
    ...    Test objective: The objective is to test the upload of an NSD Content in Zip format when the NFVO supports the synchronous upload mode.
    ...    Pre-conditions: One or more NSDs are onboarded in the NFVO.
Najam UI Hassan's avatar
Najam UI Hassan committed
166
    ...    Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
167
    ...    Config ID: Config_prod_NFVO
168
169
    ...    Applicability: The NFVO supports the upload of NSD contents in synchronous mode
    ...    Post-Conditions: The NSD content is successfully uploaded and available in the NFVO
Giacomo Bernini's avatar
Giacomo Bernini committed
170
171
    Send PUT Request to upload NSD Content as zip file in synchronous mode
    Check HTTP Response Status Code Is    204
172
    Check Postcondition NSD Content is uploaded and available in the NFVO
173
174
175
176
177
178
179
180
181
182
183
184

Void
     [Documentation]    Test ID: 5.3.1.3.14
    ...    Test title: Void
    ...    Test objective: Void
    ...    Pre-conditions: Void
    ...    Reference: Void
    ...    Config ID: Void
    ...    Applicability: Void
    ...    Post-Conditions: Void
    Void

Giacomo Bernini's avatar
Giacomo Bernini committed
185
186
187
188
189
Upload NSD Content with conflict due to onboarding state
   [Documentation]    Test ID: 5.3.1.3.15
    ...    Test title: Upload NSD Content with conflict due to onboarding state
    ...    Test objective: The objective is to test that the upload of the NSD Content fails due to a conflict when the NSD is not in onboarding state CREATED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: The onboarding state of the NSD for which the NSD Content is requested is different from ONBOARDED.
Najam UI Hassan's avatar
Najam UI Hassan committed
190
    ...    Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
191
192
193
194
195
196
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none 
    Send PUT Request to upload NSD Content with conflict due to onboarding state
    Check HTTP Response Status Code Is    409
    Check HTTP Response Body Json Schema Is   ProblemDetails             
197

Giacomo Bernini's avatar
Giacomo Bernini committed
198
199
200
201
202
POST NSD Content - Method not implemented
    [Documentation]    Test ID: 5.3.1.3.16
    ...    Test title: POST NSD Content - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor content
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
203
    ...    Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
204
205
206
207
208
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send POST Request for NSD Content
    Check HTTP Response Status Code Is    405
209

Giacomo Bernini's avatar
Giacomo Bernini committed
210
PATCH NSD Content - Method not implemented
211
    [Documentation]    Test ID: 5.3.1.3.17
Giacomo Bernini's avatar
Giacomo Bernini committed
212
213
214
    ...    Test title: PATCH NSD Content - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor content
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
215
    ...    Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
216
217
218
219
220
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send PATCH Request for NSD Content
    Check HTTP Response Status Code Is    405
221

Giacomo Bernini's avatar
Giacomo Bernini committed
222
DELETE NSD Content - Method not implemented
223
    [Documentation]    Test ID: 5.3.1.3.18
Giacomo Bernini's avatar
Giacomo Bernini committed
224
225
226
    ...    Test title: DELETE NSD Content - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor content
    ...    Pre-conditions: none
Najam UI Hassan's avatar
Najam UI Hassan committed
227
    ...    Reference: Clause 5.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1
Giacomo Bernini's avatar
Giacomo Bernini committed
228
229
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
Najam UI Hassan's avatar
Najam UI Hassan committed
230
    ...    Post-Conditions: none
Giacomo Bernini's avatar
Giacomo Bernini committed
231
    Send DELETE Request for NSD Content
232
233
234
235
236
237
238
    Check HTTP Response Status Code Is    405
    
    
*** Keywords ***

Void
    log    do nothing