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

12
*** Test Cases ***
13
Create new Virtualised Resources Quota Available Notification subscription
14
    [Documentation]    Test ID: 7.3.7.1.1
15
    ...    Test title: Create new Virtualised Resources Quota Available Notification subscription
16
    ...    Test objective: The objective is to create a new Virtualised Resources Quota Available Notification subscription and perform a JSON schema and content validation of the returned subscription data structure 
17
    ...    Pre-conditions: no subscription with the same filter and callbackUri exists
Michele Carignani's avatar
Michele Carignani committed
18
    ...    Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
19
    ...    Config ID: Config_prod_VNFM
20
21
    ...    Applicability: none
    ...    Post-Conditions: none
22
    Send Post request for new Virtualised Resources Quota Available Notification subscription
23
24
    Check HTTP Response Status Code Is    201
    Check HTTP Response Header Contains    Location
25
    Check HTTP Response Body Json Schema Is    VrQuotaAvailSubscription
26
    
27

28
Create new Virtualised Resources Quota Available Notification subscription - DUPLICATION
29
    [Documentation]    Test ID: 7.3.7.1.2
30
    ...    Test title: Create new Virtualised Resources Quota Available Notification subscription - DUPLICATION
31
    ...    Test objective: The objective is to create a new Virtualised Resources Quota Available Notification subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure
32
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
Michele Carignani's avatar
Michele Carignani committed
33
    ...    Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
34
35
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: the VNFM allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists
36
    ...    Post-Conditions: none
37
    Send Post request for new Virtualised Resources Quota Available Notification subscription - DUPLICATION
38
39
    Check HTTP Response Status Code Is    201
    Check HTTP Response Header Contains    Location
40
    Check HTTP Response Body Json Schema Is    VrQuotaAvailSubscription
41
    
42
Create new Virtualised Resources Quota Available Notification subscription - NO-DUPLICATION
43
    [Documentation]    Test ID: 7.3.7.1.3
44
    ...    Test title: Create new Virtualised Resources Quota Available Notification subscription - NO-DUPLICATION
45
    ...    Test objective: The objective is to create a nduplicated Virtualised Resources Quota Available Notification subscription and verify that the VNF does not allow duplication
46
    ...    Pre-conditions: subscription with the same filter and callbackUri exists
Michele Carignani's avatar
Michele Carignani committed
47
    ...    Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
48
49
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: the VNFM decides to not create a duplicate subscription resource 
50
    ...    Post-Conditions: none
51
    Send Post request for new Virtualised Resources Quota Available Notification subscription - NO-DUPLICATION
52
53
    Check HTTP Response Status Code Is    303
    Check HTTP Response Header Contains    Location
54

55
GET Virtualised Resources Quota Available Notification Subscriptions
56
    [Documentation]    Test ID: 7.3.7.1.4
57
    ...    Test title: GET Virtualised Resources Quota Available Notification Subscriptions 
58
    ...    Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions and perform a JSON schema and content validation of the returned  subscriptions data structure
59
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
60
    ...    Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
61
    ...    Config ID: Config_prod_VNFM
62
63
    ...    Applicability:  none
    ...    Post-Conditions: none
64
    GET Virtualised Resources Quota Available Notification Subscriptions
65
    Check HTTP Response Status Code Is    200
66
    Check HTTP Response Body Json Schema Is   subscriptions
67

68
GET Virtualised Resources Quota Available Notification Subscriptions with attribute-based Filter
69
    [Documentation]    Test ID: 7.3.7.1.5
70
    ...    Test title: GET Virtualised Resources Quota Available Notification Subscriptions with attribute-based Filter
71
    ...    Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions and perform a JSON schema and content validation of the returned subscriptions data structure, and verify that the retrieved information matches the issued attribute-based filters
72
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
73
    ...    Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
74
    ...    Config ID: Config_prod_VNFM
75
76
    ...    Applicability:  none
    ...    Post-Conditions: none
77
    GET Virtualised Resources Quota Available Notification Subscriptions with Filter
78
    Check HTTP Response Status Code Is    200
79
    Check HTTP Response Body Json Schema Is    VrQuotaAvailSubscriptions
80
    
81
GET Virtualised Resources Quota Available Notification subscriptions - Bad Request Invalid attribute-based filtering parameters
82
    [Documentation]    Test ID: 7.3.7.1.6
83
    ...    Test title: GET Virtualised Resources Quota Available Notification subscriptions - Bad Request Invalid attribute-based filtering parameters
84
    ...    Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions with invalid attribute-based filtering parameters, and verify that problem details are returned 
85
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
86
    ...    Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
87
    ...    Config ID: Config_prod_VNFM
88
89
    ...    Applicability: none 
    ...    Post-Conditions: none
90
    Get Virtualised Resources Quota Available Notification subscriptions with Bad Request Invalid attribute-based filtering parameters 
91
    Check HTTP Response Status Code Is    400
92
    Check HTTP Response Body Json Schema Is    ProblemDetails
93
    
94
PUT Virtualised Resources Quota Available Notification subscriptions - Method not implemented
95
    [Documentation]    Test ID: 7.3.7.1.7
96
    ...    Test title: PUT Virtualised Resources Quota Available Notification subscriptions - Method not implemented
97
    ...    Test objective: The objective is to test that PUT method is not allowed to update existing Virtualised Resources Quota Available Notification subscriptions instance on VNF 
AHMADABB's avatar
AHMADABB committed
98
    ...    Pre-conditions: A VNF instance is instantiated
Michele Carignani's avatar
Michele Carignani committed
99
    ...    Reference: Clause 11.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
100
101
102
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
103
    Send Put request for Virtualised Resources Quota Available Notification subscription   
104
    Check HTTP Response Status Code Is    405
105

106
PATCH Virtualised Resources Quota Available Notification subscriptions - Method not implemented
107
    [Documentation]    Test ID: 7.3.7.1.8
108
    ...    Test title: PATCH Virtualised Resources Quota Available Notification subscriptions - Method not implemented
109
    ...    Test objective: The objective is to test that PATCH method is not allowed to modify Virtualised Resources Quota Available Notification subscriptions instance on VNF 
AHMADABB's avatar
AHMADABB committed
110
    ...    Pre-conditions: A VNF instance is instantiated
Michele Carignani's avatar
Michele Carignani committed
111
    ...    Reference: Clause 11.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
112
113
114
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
115
    Send Patch request for Virtualised Resources Quota Available Notification subscription   
116
    Check HTTP Response Status Code Is    405
117

118
DELETE Virtualised Resources Quota Available Notification subscriptions - Method not implemented
119
    [Documentation]    Test ID: 7.3.7.1.9
120
    ...    Test title: DELETE Virtualised Resources Quota Available Notification subscriptions - Method not implemented
121
    ...    Test objective: The objective is to test that PATCH method is not allowed to delete Virtualised Resources Quota Available Notification subscriptions instance on VNF 
AHMADABB's avatar
AHMADABB committed
122
    ...    Pre-conditions: A VNF instance is instantiated
Michele Carignani's avatar
Michele Carignani committed
123
    ...    Reference: Clause 11.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
124
125
126
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none
    ...    Post-Conditions: none
127
    Send Delete request for Virtualised Resources Quota Available Notification subscription   
128
    Check HTTP Response Status Code Is    405
AHMADABB's avatar
AHMADABB committed
129
    Check Postcondition VNF Virtualised Resources Quota Available Notification Subscriptions Exists
130
131
132
133
134
135
    
GET Virtualised Resources Quota Available Notification Subscriptions as Paged Response
    [Documentation]    Test ID: 7.3.7.1.10
    ...    Test title: GET Virtualised Resources Quota Available Notification Subscriptions as Paged Response 
    ...    Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions as a Paged Response.
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
136
    ...    Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
137
138
139
140
141
142
    ...    Config ID: Config_prod_VNFM
    ...    Applicability:  none
    ...    Post-Conditions: none
    GET Virtualised Resources Quota Available Notification Subscriptions
    Check HTTP Response Status Code Is    200
    Check LINK in Header
143

144
145
146
147
148
GET Virtualised Resources Quota Available Notification subscriptions - Bad Request Response too Big
    [Documentation]    Test ID: 7.3.7.1.11
    ...    Test title: GET Virtualised Resources Quota Available Notification subscriptions - Bad Request Response too Big
    ...    Test objective: The objective is to test that the retrieval of active Virtualised Resources Quota Available Notification subscriptions list fails because response is too big, and verify that problem details are returned 
    ...    Pre-conditions: none
Michele Carignani's avatar
Michele Carignani committed
149
    ...    Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
150
151
152
153
154
155
    ...    Config ID: Config_prod_VNFM
    ...    Applicability: none 
    ...    Post-Conditions: none
     GET Virtualised Resources Quota Available Notification Subscriptions
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is    ProblemDetails