Subscriptions.robot 11.2 KB
Newer Older
1
2
*** Settings ***
Library           JSONSchemaLibrary    schemas/
3
Resource          environment/variables.txt    # Generic Parameters
Elian Kraja's avatar
Elian Kraja committed
4
Library           REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT}    ssl_verify=false
5
6
Library           OperatingSystem
Library           JSONLibrary
7
Resource          VNFPerformanceManagementKeywords.robot
8
Resource          environment/subscriptions.txt
9
10
11
12
Library           MockServerLibrary
Library           Process
Suite Setup       Create Sessions
Suite Teardown    Terminate All Processes    kill=true
13
14

*** Test Cases ***
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
15
16
17
18
19
GET all VNF Performance Subscriptions
    [Documentation]    Test ID: 7.3.4.6.1
    ...    Test title: GET all VNF Performance Subscriptions
    ...    Test objective: The objective is to test the retrieval of all VNF performance subscriptions and perform a JSON schema validation of the returned subscriptions data structure
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
20
    ...    Reference: clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
21
22
23
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
24
    Get all VNF Performance Subscriptions
25
26
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PmSubscriptions
27

Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
28
29
30
31
32
GET VNF Performance Subscriptions with attribute-based filter
    [Documentation]    Test ID: 7.3.4.6.2
    ...    Test title: GET VNF Performance Subscriptions with attribute-based filter
    ...    Test objective: The objective is to test the retrieval of VNF performance subscriptions using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters 
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
33
    ...    Reference: clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
34
35
36
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
37
    Get VNF Performance Subscriptions with attribute-based filters
38
39
40
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    PmSubscriptions
    Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter 
41

Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
42
43
44
45
46
GET VNF Performance Management Subscriptions with invalid attribute-based filter
    [Documentation]    Test ID: 7.3.4.6.3
    ...    Test title: GET VNF Performance Management Subscriptions with invalid attribute-based filter
    ...    Test objective: The objective is to test that the retrieval of VNF performance subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. 
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
47
    ...    Reference: clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
48
49
50
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
51
    Get VNF Performance Subscriptions with invalid attribute-based filters
52
53
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is   ProblemDetails 
54

Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
55
56
57
58
59
GET VNF Performance Subscriptions with invalid resource endpoint
    [Documentation]    Test ID: 7.3.4.6.4
    ...    Test title: GET VNF Performance Subscriptions with invalid resource endpoint
    ...    Test objective: The objective is to test that the retrieval of all VNF performance subscriptions fails when using invalid resource endpoint.
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
60
    ...    Reference: clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
61
62
63
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
64
    Get VNF Performance Subscriptions with invalid resource endpoint
65
66
    Check HTTP Response Status Code Is    404
    
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
67
Create new VNF Performance subscription
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
68
69
70
71
    [Documentation]    Test ID 7.3.4.6.5
    ...    Test title: Create new VNF Performance subscription
    ...    Test objective: The objective is to test the creation of a new VNF performance subscription and perform a JSON schema and content validation of the returned subscription data structure
    ...    Pre-conditions: A VNF instance is instantiated.
72
    ...    Reference: clause 6.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
73
74
75
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: The VNF performance subscription is successfully set and it matches the issued subscription    
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
76
    Send Post Request for VNF Performance Subscription
77
78
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    PmSubscription
79
    Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
80
    Check Postcondition VNF Performance Subscription Is Set 
81
82


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

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

Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
115
PUT VNF Performance Subscriptions - Method not implemented
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
116
117
118
119
    [Documentation]    Test ID 7.3.4.6.8
    ...    Test title: PUT VNF Performance Subscriptions - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify VNF performance subscriptions
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
120
    ...    Reference: clause 6.4.7.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
121
122
123
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
124
    Send Put Request for VNF Performance Subscriptions
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
125
    Check HTTP Response Status Code Is    405 
126
    
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
127
PATCH VNF Performance Subscriptions - Method not implemented
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
128
129
130
131
    [Documentation]    Test ID 7.3.4.6.9
    ...    Test title: PATCH VNF Performance Subscriptions - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update VNF performance subscriptions
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
132
    ...    Reference: clause 6.4.7.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
133
134
135
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
136
    Send Patch Request for VNF Performance Subscriptions
137
138
    Check HTTP Response Status Code Is    405
    
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
139
DELETE VNF Performance Subscriptions - Method not implemented
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
140
141
142
143
    [Documentation]    Test ID 7.3.4.6.10
    ...    Test title: DELETE VNF Performance Subscriptions - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete VNF performance subscriptions
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
144
    ...    Reference: clause 6.4.7.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
145
146
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
Giacomo Bernini's avatar
Giacomo Bernini committed
147
    ...    Post-Conditions: The VNF performance subscriptions are not deleted by the failed operation   
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
148
    Send Delete Request for VNF Performance Subscriptions
149
    Check HTTP Response Status Code Is    405
Giacomo Bernini's avatar
upd    
Giacomo Bernini committed
150
    Check Postcondition VNF Performance Subscriptions Exists
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

GET all VNF Performance Subscriptions as Paged Response
    [Documentation]    Test ID: 7.3.4.6.11
    ...    Test title: GET all VNF Performance Subscriptions as Paged Response
    ...    Test objective: The objective is to test the retrieval of all VNF performance subscriptions as Paged Response.
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
    ...    Reference: clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none    
    Get all VNF Performance Subscriptions
    Check HTTP Response Status Code Is    200
    Check LINK in Header
    
GET VNF Performance Management Subscriptions - Bad Request Response too Big
    [Documentation]    Test ID: 7.3.4.6.12
    ...    Test title: GET VNF Performance Management Subscriptions - Bad Request Response too Big
    ...    Test objective: The objective is to test that the retrieval of VNF performance subscriptions fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. 
    ...    Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM.
    ...    Reference: clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
    Get all VNF Performance Subscriptions
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is   ProblemDetails