Subscriptions.robot 9.52 KB
Newer Older
mengxuan.zhao's avatar
mengxuan.zhao committed
1
*** Settings ***
2
Resource    environment/variables.txt 
AHMADABB's avatar
AHMADABB committed
3
4
Resource    FaultManagement-APIKeyword.robot
Library    DependencyLibrary    
5
Library    REST    ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} 
mengxuan.zhao's avatar
mengxuan.zhao committed
6
Library    OperatingSystem
7
8
Library    JSONLibrary
Library    JSONSchemaLibrary    schemas/
mengxuan.zhao's avatar
mengxuan.zhao committed
9
10

*** Test Cases ***
AHMADABB's avatar
AHMADABB committed
11
12
13
14
15
Create a new Fault Management alarm subscription
    [Documentation]    Test ID: 7.3.5.3.1
    ...    Test title: Create a new Fault Management alarm subscription
    ...    Test objective: The objective is to create a new Fault management alarm subscriptions and perform a JSON schema and content validation of the returned fault management alarms subscription data structure
    ...    Pre-conditions: No subscription with the same filter and callbackUri exists
16
    ...    Reference: clause 7.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1
AHMADABB's avatar
AHMADABB committed
17
18
    ...    Config ID:   Config_prod_VNFM
    ...    Applicability: none
aureliano sinatra's avatar
aureliano sinatra committed
19
    ...    Post-Conditions: subscription is created
AHMADABB's avatar
AHMADABB committed
20
21
    POST Subscription
    Check HTTP Response Status Code Is    201
aureliano sinatra's avatar
aureliano sinatra committed
22
    Check Operation Occurrence Id
AHMADABB's avatar
AHMADABB committed
23
    Check HTTP Response Body Json Schema Is  FmSubscription
root's avatar
root committed
24
    Check created Subscription existance 
AHMADABB's avatar
AHMADABB committed
25
  
mengxuan.zhao's avatar
mengxuan.zhao committed
26

AHMADABB's avatar
AHMADABB committed
27
28
Create a new alarm subscription - DUPLICATION
     [Documentation]    Test ID: 7.3.5.3.2
mengxuan.zhao's avatar
mengxuan.zhao committed
29
    ...    Test title: Create a new alarm subscription - DUPLICATION
AHMADABB's avatar
AHMADABB committed
30
    ...    Test objective: The objective is to create a new subscription with the VNF allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure.
mengxuan.zhao's avatar
mengxuan.zhao committed
31
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
32
    ...    Reference: clause 7.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1
AHMADABB's avatar
AHMADABB committed
33
34
    ...    Config ID:   Config_prod_VNFM
    ...    Applicability: the NFVO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists
aureliano sinatra's avatar
aureliano sinatra committed
35
    ...    Post-Conditions: duplicated subscription is created
AHMADABB's avatar
AHMADABB committed
36
37
    POST Subscription Duplication permitted
    Check HTTP Response Status Code Is    201
aureliano sinatra's avatar
aureliano sinatra committed
38
    Check Operation Occurrence Id
AHMADABB's avatar
AHMADABB committed
39
    Check HTTP Response Body Json Schema Is  FmSubscription
mengxuan.zhao's avatar
mengxuan.zhao committed
40

AHMADABB's avatar
AHMADABB committed
41
42
Create a new alarm subscription - NO DUPLICATION
    [Documentation]    Test ID: 7.3.5.3.3
mengxuan.zhao's avatar
mengxuan.zhao committed
43
    ...    Test title: Create a new alarm subscription - NO DUPLICATION
AHMADABB's avatar
AHMADABB committed
44
    ...    Test objective: The objective is to create a new subscription with the VNF not allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure.
mengxuan.zhao's avatar
mengxuan.zhao committed
45
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
46
    ...    Reference: clause 7.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1
AHMADABB's avatar
AHMADABB committed
47
48
    ...    Config ID:   Config_prod_VNFM
    ...    Applicability: the NFVO decides to not create a duplicate subscription resource 
aureliano sinatra's avatar
aureliano sinatra committed
49
    ...    Post-Conditions: duplicated subscription is not created
AHMADABB's avatar
AHMADABB committed
50
51
    POST Subscription Duplication not permitted
    Check HTTP Response Status Code Is    303
aureliano sinatra's avatar
aureliano sinatra committed
52
    Check Operation Occurrence Id
AHMADABB's avatar
AHMADABB committed
53
    Check HTTP Response Body Json Schema Is  FmSubscription
root's avatar
root committed
54
    Check created Subscription existance 
mengxuan.zhao's avatar
mengxuan.zhao committed
55

AHMADABB's avatar
AHMADABB committed
56
57
Retrieve a list of alarm subscriptions
    [Documentation]    Test ID: 7.3.5.3.4
mengxuan.zhao's avatar
mengxuan.zhao committed
58
    ...    Test title: Retrieve a list of alarm subscriptions
AHMADABB's avatar
AHMADABB committed
59
60
    ...    Test objective: The objective is to retrieve the list of active subscriptions and perform a JSON schema and content validation of the returned fault management alarms subscription data structure.
    ...    Pre-conditions: none
61
    ...    Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
AHMADABB's avatar
AHMADABB committed
62
63
64
65
66
67
68
69
70
71
72
73
    ...    Config ID:   Config_prod_VNFM
    ...    Applicability:  none
    ...    Post-Conditions: noe
    GET Subscriptions
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    FmSubscriptions
    
Retrieve a list of alarm subscriptions with filter
    [Documentation]    Test ID: 7.3.5.3.5
    ...    Test title: Retrieve a list of alarm subscriptions with filter
    ...    Test objective: The objective is to retrieve the list of active subscriptions with filter and perform a JSON schema and content validation of the returned fault management alarms subscription data structure.
    ...    Pre-conditions: none 
74
    ...    Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
AHMADABB's avatar
AHMADABB committed
75
76
77
78
79
80
    ...    Config ID:   Config_prod_VNFM
    ...    Applicability:  none
    ...    Post-Conditions: none
    GET Subscriptions with filter
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    FmSubscriptions
mengxuan.zhao's avatar
mengxuan.zhao committed
81
82
    
GET subscriptions - Bad Request Invalid attribute-based filtering parameters
AHMADABB's avatar
AHMADABB committed
83
84
85
86
    [Documentation]    Test ID: 7.3.5.3.6
    ...    Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters
    ...    Test objective: The objective is to retrieve the list of active subscriptions with Invalid attribute-based filtering parameters and perform a JSON schema and content validation of the returned problem details data structure.
    ...    Pre-conditions: none
87
    ...    Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
AHMADABB's avatar
AHMADABB committed
88
89
90
91
92
93
    ...    Config ID:   Config_prod_VNFM
    ...    Applicability:  none
    ...    Post-Conditions:    none 
    GET Subscriptions with Invalid filter
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails
aureliano sinatra's avatar
aureliano sinatra committed
94
95
96
97
98
99

GET subscriptions with "all_fields" attribute selector
    [Documentation]    Test ID: 7.3.5.3.7
    ...    Test title: GET subscriptions with "all_fields" attribute selector
    ...    Test objective: The objective is to retrieve the list of active subscriptions with attribute selector
    ...    Pre-conditions: 
100
    ...    Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
aureliano sinatra's avatar
aureliano sinatra committed
101
102
103
104
105
106
107
108
109
110
111
112
    ...    Config ID: Config_prod_VNFM
    ...    Applicability:  
    ...    Post-Conditions: 
    Get subscriptions with all_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   FmSubscriptions 

GET subscriptions with "exclude_default" attribute selector
    [Documentation]    Test ID: 7.3.5.3.8
    ...    Test title: GET subscriptions with "exclude_default" attribute selector
    ...    Test objective: The objective is to retrieve the list of active subscriptions with attribute selector
    ...    Pre-conditions: 
113
    ...    Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
aureliano sinatra's avatar
aureliano sinatra committed
114
115
116
117
118
119
120
121
122
123
124
125
    ...    Config ID: Config_prod_VNFM
    ...    Applicability:  
    ...    Post-Conditions: 
    Get subscriptions with exclude_default attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   FmSubscriptions

GET subscriptions with "fields" attribute selector
    [Documentation]    Test ID: 7.3.5.3.9
    ...    Test title: GET subscriptions with "fields" attribute selector
    ...    Test objective: The objective is to retrieve the list of active subscriptions with attribute selector
    ...    Pre-conditions: 
126
    ...    Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
aureliano sinatra's avatar
aureliano sinatra committed
127
128
129
130
131
132
133
134
135
136
137
138
    ...    Config ID: Config_prod_VNFM
    ...    Applicability:  
    ...    Post-Conditions: 
    Get subscriptions with fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   FmSubscriptions

GET subscriptions with "exclude_fields" attribute selector
    [Documentation]    Test ID: 7.3.5.3.10
    ...    Test title: GET subscriptions with "exclude_fields" attribute selector
    ...    Test objective: The objective is to retrieve the list of active subscriptions with attribute selector
    ...    Pre-conditions: 
139
    ...    Reference: clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
aureliano sinatra's avatar
aureliano sinatra committed
140
141
142
143
144
145
    ...    Config ID: Config_prod_VNFM
    ...    Applicability:  
    ...    Post-Conditions: 
    Get subscriptions with exclude_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   FmSubscriptions  
mengxuan.zhao's avatar
mengxuan.zhao committed
146
147
    
PUT subscriptions - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
148
    [Documentation]    Test ID: 7.3.5.3.11
AHMADABB's avatar
AHMADABB committed
149
150
151
    ...    Test title:PUT subscriptions - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to for Fault management subscriptions on VNF 
    ...    Pre-conditions: none
152
    ...    RReference: clause 7.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.4.1
AHMADABB's avatar
AHMADABB committed
153
154
155
156
157
    ...    Config ID:  Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions:  none
    Put Subscriptions
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed
158
159

PATCH subscriptions - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
160
    [Documentation]    Test ID: 7.3.5.3.12
AHMADABB's avatar
AHMADABB committed
161
162
163
    ...    Test title: PATCH subscriptions - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to for Fault management subscriptions on VNF  
    ...    Pre-conditions: none
164
    ...    Reference: clause 7.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1
AHMADABB's avatar
AHMADABB committed
165
166
167
168
169
    ...    Config ID:  Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions:  none
    PATCH Subscriptions
    Check HTTP Response Status Code Is    405
mengxuan.zhao's avatar
mengxuan.zhao committed
170
171

DELETE subscriptions - Method not implemented
aureliano sinatra's avatar
aureliano sinatra committed
172
    [Documentation]    Test ID: 7.3.5.3.13
aureliano sinatra's avatar
aureliano sinatra committed
173
    ...    Test title: DELETE subscriptions - Method not implemented
AHMADABB's avatar
AHMADABB committed
174
175
    ...    Test objective: The objective is to test that DELETE method is not allowed to for Fault management subscriptions on VNF  
    ...    Pre-conditions: none 
176
    ...    Reference: clause 7.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1
AHMADABB's avatar
AHMADABB committed
177
178
    ...    Config ID:  Config_prod_VNFM
    ...    Applicability: none
aureliano sinatra's avatar
aureliano sinatra committed
179
    ...    Post-Conditions: subscription is not deleted
AHMADABB's avatar
AHMADABB committed
180
181
    DELETE Subscriptions
    Check HTTP Response Status Code Is    405