Subscriptions.robot 12.3 KB
Newer Older
1
2
*** Settings ***
Library           JSONSchemaLibrary    schemas/
3
Resource          environment/variables.txt    # Generic Parameters
4
Resource          VNFPackageManagementKeywords.robot
5
Library           OperatingSystem
6
Library           JSONLibrary
7
8
9
10
11
Library           REST    ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}    ssl_verify=false
Library           MockServerLibrary
Library           Process
Suite Setup       Create Sessions
Suite Teardown    Terminate All Processes    kill=true
12
13

*** Test Cases ***
14
Get All VNF Package Subscriptions
15
16
17
18
    [Documentation]    Test ID: 7.3.3.6.1
    ...    Test title: GET all VNF Package Subscriptions
    ...    Test objective: The objective is to test the retrieval of all VNF package subscriptions and perform a JSON schema validation of the returned subscriptions data structure
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
19
    ...    Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.8.1
20
21
22
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none    
23
24
25
26
27
    Get all VNF Package Subscriptions
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PkgmSubscriptions

Get VNF Package Subscriptions with attribute-based filter
28
29
30
31
    [Documentation]    Test ID: 7.3.3.6.2
    ...    Test title: Get VNF Package Subscriptions with attribute-based filter
    ...    Test objective: The objective is to test the retrieval of VNF package subscriptions using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filters 
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
32
    ...    Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.8.1
33
34
35
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
36
37
38
39
40
41
    Get VNF Package Subscriptions with attribute-based filters
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PkgmSubscription
    Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter

Get VNF Package Subscriptions with invalid attribute-based filter
42
43
44
45
    [Documentation]    Test ID: 7.3.3.6.3
    ...    Test title: Get VNF Package Subscriptions with attribute-based filters
    ...    Test objective: The objective is to test that the retrieval of VNF package subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. 
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
46
    ...    Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.8.1
47
48
49
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
50
51
52
53
54
    Get VNF Package Subscriptions with invalid attribute-based filters
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is   ProblemDetails    
    
GET VNF Package Subscription with invalid resource endpoint
55
56
57
58
    [Documentation]    Test ID: 7.3.3.6.4
    ...    Test title: GET VNF Package Subscription with invalid resource endpoint
    ...    Test objective: The objective is to test that the retrieval of all VNF package subscriptions fails when using invalid resource endpoint.
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
59
    ...    Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.8.1
60
61
62
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none    
63
64
    Get VNF Package Subscriptions with invalid resource endpoint
    Check HTTP Response Status Code Is    404
65
    Check HTTP Response Body Json Schema Is   ProblemDetails
66
67

Create new VNF Package subscription
Giacomo Bernini's avatar
upd  
Giacomo Bernini committed
68
    [Documentation]    Test ID: 7.3.3.6.5
69
70
71
    ...    Test title: Create new VNF Package subscription
    ...    Test objective: The objective is to test the creation of a new VNF package subscription and perform a JSON schema and content validation of the returned subscription data structure
    ...    Pre-conditions: none
72
    ...    Reference: Clause 10.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.8.1
73
74
75
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: The VNF package subscription is successfully set and it matches the issued subscription    
76
77
78
    Send Post Request for VNF Package Subscription
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    PkgmSubscription
79
    Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription
80
81
82
    Check Postcondition VNF Package Subscription Is Set 


83
Create duplicated VNF Package subscription with NFVO not creating duplicated subscriptions
84
    [Tags]    no-duplicated-subs
Giacomo Bernini's avatar
upd  
Giacomo Bernini committed
85
    [Documentation]    Test ID: 7.3.3.6.6
86
87
88
    ...    Test title: Create duplicated VNF Package subscription with NFVO not creating duplicated subscriptions
    ...    Test objective: The objective is to test the attempt of a creation of a duplicated VNF package subscription and check that no new subscription is created by the NFVO and a link to the original subscription is returned
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
89
    ...    Reference: Clause 10.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.8.1
90
91
92
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The NFVO does not support the creation of duplicated subscriptions
    ...    Post-Conditions: The existing VNF package subscription returned is available in the NFVO
93
94
95
96
    Send Post Request for Duplicated VNF Package Subscription
    Check HTTP Response Status Code Is    303
    Check HTTP Response Body Is Empty
    Check HTTP Response Header Contains    Location
97
    Check Postcondition Subscription Resource Returned in Location Header Is Available
98

99
Create duplicated VNF Package subscription with NFVO creating duplicated subscriptions
100
    [Tags]    duplicated-subs
Giacomo Bernini's avatar
upd  
Giacomo Bernini committed
101
    [Documentation]    Test ID: 7.3.3.6.7
102
103
104
    ...    Test title: Create duplicated VNF Package subscription with NFVO creating duplicated subscriptions
    ...    Test objective: The objective is to test the creation of a duplicated VNF package subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
105
    ...    Reference: Clause 10.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.8.1
106
107
108
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The NFVO supports the creation of duplicated subscriptions
    ...    Post-Conditions: The duplicated VNF package subscription is successfully set and it matches the issued subscription
109
110
    Send Post Request for Duplicated VNF Package Subscription
    Check HTTP Response Status Code Is    201
111
112
    Check HTTP Response Body Json Schema Is    PkgmSubscription
    Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription
113
114
115
    Check Postcondition VNF Package Subscription Is Set 

PUT VNF Package Subscriptions - Method not implemented
Giacomo Bernini's avatar
upd  
Giacomo Bernini committed
116
    [Documentation]    Test ID: 7.3.3.6.8
117
118
119
    ...    Test title: PUT VNF Package Subscriptions - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify VNF package subscriptions
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
120
    ...    Reference: Clause 10.4.7.3.3 - ETSI GS NFV-SOL 003 [1] v2.8.1
121
122
123
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
124
125
126
127
    Send Put Request for VNF Package Subscriptions
    Check HTTP Response Status Code Is    405
    
PATCH VNF Package Subscriptions - Method not implemented
Giacomo Bernini's avatar
upd  
Giacomo Bernini committed
128
    [Documentation]    Test ID: 7.3.3.6.9
129
130
131
    ...    Test title: PATCH VNF Package Subscriptions - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update VNF package subscriptions
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
132
    ...    Reference: Clause 10.4.7.3.4 - ETSI GS NFV-SOL 003 [1] v2.8.1
133
134
135
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
136
137
138
139
140
    Send Patch Request for VNF Package Subscriptions
    Check HTTP Response Status Code Is    405
    
        
DELETE VNF Package Subscriptions - Method not implemented
Giacomo Bernini's avatar
upd  
Giacomo Bernini committed
141
    [Documentation]    Test ID: 7.3.3.6.10
142
143
144
    ...    Test title: DELETE VNF Package Subscriptions - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete VNF package subscriptions
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
145
    ...    Reference: Clause 10.4.7.3.5 - ETSI GS NFV-SOL 003 [1] v2.8.1
146
147
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
148
    ...    Post-Conditions: none
149
150
    Send Delete Request for VNF Package Subscriptions
    Check HTTP Response Status Code Is    405
151
152
153
154
155
156
    
Get All VNF Package Subscriptions as Paged Response
    [Documentation]    Test ID: 7.3.3.6.11
    ...    Test title: GET all VNF Package Subscriptions as Paged Response
    ...    Test objective: The objective is to test the retrieval of all VNF package subscriptions as Paged Response.
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
157
    ...    Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.8.1
158
    ...    Config ID: Config_prod_NFVO
159
    ...    Applicability: The VNFM supports response paging for the subscription resources
160
161
162
    ...    Post-Conditions: none    
    Get all VNF Package Subscriptions
    Check HTTP Response Status Code Is    200
163
    Check HTTP Response Header Contain Link
164

165
166
167
168
169
170
171
172
173
174
175
176
GET All VNF Package Subscriptions as a Paged Response with nextpage_opauque_marker parameter 
     [Documentation]    Test ID: 7.3.3.6.11a
    ...    Test title: GET All VNF Package Subscriptions as a Paged Response with nextpage_opauque_marker parameter   
    ...    Test objective: The objective is to query information about all VNF package subscriptions as a Paged Response and retrieve the next page using the nextpage_opaque_marker parameter
    ...    Pre-conditions: A request for retrieving all VNF package subscriptions as a paged response has been successfully issued (Test ID: 7.3.3.6.11)
    ...    Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.8.1
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The VNFM supports response paging for the subscription resources
    ...    Post-Conditions: none 
    GET All VNF Package Subscriptions with nextpage_opaque_marker parameter 
    Check HTTP Response Status Code Is    200

177
178
179
180
181
Get VNF Package Subscriptions - Bad Request Response too Big
    [Documentation]    Test ID: 7.3.3.6.12
    ...    Test title: Get VNF Package Subscriptions - Bad Request Response too Big
    ...    Test objective: The objective is to test that the retrieval of VNF package subscriptions fails because reponse is too big, and perform the JSON schema validation of the failed operation HTTP response. 
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
182
    ...    Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.8.1
183
184
185
186
187
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get all VNF Package Subscriptions
    Check HTTP Response Status Code Is    400
188
189
190
191
192
193
194
    Check HTTP Response Body Json Schema Is   ProblemDetails
    
Get VNF Package Subscriptions - Unprocessable Entity
    [Documentation]    Test ID: 7.3.3.6.13
    ...    Test title: Get VNF Package Subscriptions - Unprocessable Entity
    ...    Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed., and perform the JSON schema validation of the failed operation HTTP response. 
    ...    Pre-conditions: At least one VNF package subscription is available in the NFVO.
195
    ...    Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.8.1
196
197
198
199
200
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Get all VNF Package Subscriptions
    Check HTTP Response Status Code Is    422
201
    Check HTTP Response Body Json Schema Is   ProblemDetails