VNFPackages.robot 9.91 KB
Newer Older
1
2
3
*** Settings ***
Resource          environment/vnfPackages.txt    # VNF Packages specific parameters
Library           JSONSchemaLibrary    schemas/
4
Resource          environment/variables.txt    # Generic Parameters
5
Resource          VNFPackageManagementKeywords.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

*** Test Cases ***
10
11
12
13
14
GET all VNF Packages
    [Documentation]    Test ID: 7.3.3.1.1
    ...    Test title: GET all VNF Packages
    ...    Test objective: The objective is to test the retrieval of all the available VNF packages information and perform a JSON schema and content validation of the collected data structure
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
15
    ...    Reference: clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
16
17
18
19
20
21
22
23
24
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET all VNF Packages
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   vnfPkgsInfo
    Check HTTP Response Body Does Not Contain softwareImages
    Check HTTP Response Body Does Not Contain additionalArtifacts
    Check HTTP Response Body Does Not Contain userDefinedData 
25

26
27
28
29
30
GET VNF Packages with attribute-based filter
    [Documentation]    Test ID: 7.3.3.1.2
    ...    Test title: GET VNF Packages with attribute-based filter
    ...    Test objective: The objective is to test the retrieval of VNF packages using attribute-based filter, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued attribute-based filter
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
31
    ...    Reference: clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
32
33
34
35
36
37
38
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET VNF Packages with attribute-based filter
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   vnfPkgsInfo
    Check HTTP Response Body VnfPkgsInfo Matches the requested attribute-based filter
39

40
41
42
43
44
GET VNF Packages with invalid attribute-based filter
    [Documentation]    Test ID: 7.3.3.1.3
    ...    Test title: GET VNF Packages with invalid attribute-based filter
    ...    Test objective: The objective is to test that the retrieval of VNF packages fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
45
    ...    Reference: clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
46
47
48
49
50
51
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET VNF Packages with invalid attribute-based filter
    Check HTTP Response Status Code Is    400
    Check HTTP Response Body Json Schema Is   ProblemDetails
52

53
GET VNF Packages with "all_fields" attribute selector
54
    [Documentation]    Test ID: 7.3.3.1.4
55
56
    ...    Test title: GET VNF Packages with "all_fields" attribute selector
    ...    Test objective: The objective is to test the retrieval of VNF packages with "all_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "all_fileds" selector
57
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
58
    ...    Reference: clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
59
60
61
62
63
64
65
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none    
    GET VNF Packages with all_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   vnfPkgsInfo
    Check HTTP Response Body vnfPkgsInfo Matches the requested all_fields selector
66

67
GET VNF Packages with "exclude_default" attribute selector
68
69
    [Documentation]    Test ID: 7.3.3.1.5
    ...    Test title: GET VNF Packages with exclude_default attribute selector
70
    ...    Test objective: The objective is to test the retrieval of VNF packages with "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" selector
71
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
72
    ...    Reference: clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
73
74
75
76
77
78
79
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none        
    GET VNF Packages with exclude_default attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   vnfPkgsInfo
    Check HTTP Response Body vnfPkgsInfo Matches the requested exclude_default selector
80

81
GET VNF Packages with "fields" attribute selector
82
83
    [Documentation]    Test ID: 7.3.3.1.6
    ...    Test title: GET VNF Packages with fields attribute selector
84
    ...    Test objective: The objective is to test the retrieval of VNF packages with "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector
85
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
86
    ...    Reference: clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
87
88
89
90
91
92
93
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The VNFM supports the use of fields attribute selector
    ...    Post-Conditions: none
    GET VNF Packages with fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   vnfPkgsInfo
    Check HTTP Response Body vnfPkgsInfo Matches the requested fields selector
94

95
GET VNF Packages with "exclude_fields" attribute selector
96
97
    [Documentation]    Test ID: 7.3.3.1.7
    ...    Test title: GET VNF Packages with exclude_fields attribute selector
98
    ...    Test objective: The objective is to test the retrieval of VNF packages with "exclude_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_fields" selector
99
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
100
    ...    Reference: clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
101
102
103
104
105
106
107
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: The VNFM supports the use of exclude_fields attribute selector
    ...    Post-Conditions: none
    GET VNF Packages with exclude_fields attribute selector
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   vnfPkgsInfo
    Check HTTP Response Body vnfPkgsInfo Matches the requested exclude_fields selector   
108

109
110
111
112
113
GET all VNF Packages with invalid resource endpoint
    [Documentation]    Test ID: 7.3.3.1.8
    ...    Test title: GET VNF Packages with invalid resource endpoint
    ...    Test objective: The objective is to test that the retrieval of VNF packages fails when using invalid resource endpoint
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
114
    ...    Reference: clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1
115
116
117
118
119
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    GET all VNF Packages with invalid resource endpoint
    Check HTTP Response Status Code Is    404
120

121
122
123
124
125
POST all VNF Packages - Method not implemented
    [Documentation]    Test ID: 7.3.3.1.9
    ...    Test title: POST all VNF Packages - Method not implemented
    ...    Test objective: The objective is to test that POST method is not allowed to create new VNF Packages
    ...    Pre-conditions: none
126
    ...    Reference: clause 10.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1
127
128
129
130
131
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send POST Request for all VNF Packages
    Check HTTP Response Status Code Is    405
132

133
134
135
136
137
PUT all VNF Packages - Method not implemented
    [Documentation]    Test ID: 7.3.3.1.10
    ...    Test title: PUT all VNF Packages - Method not implemented
    ...    Test objective: The objective is to test that PUT method is not allowed to modify existing VNF Packages
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
138
    ...    Reference: clause 10.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.4.1
139
140
141
142
143
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send PUT Request for all VNF Packages
    Check HTTP Response Status Code Is    405
144

145
146
147
148
149
PATCH all VNF Packages - Method not implemented
    [Documentation]    Test ID: 7.3.3.1.11
    ...    Test title: PATCH all VNF Packages - Method not implemented
    ...    Test objective: The objective is to test that PATCH method is not allowed to update existing VNF Packages
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
150
    ...    Reference: clause 10.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1
151
152
153
154
155
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: none
    Send PATCH Request for all VNF Packages
    Check HTTP Response Status Code Is    405
156

157
158
159
160
161
DELETE all VNF Packages - Method not implemented
    [Documentation]    Test ID: 7.3.3.1.12
    ...    Test title: DELETE all VNF Packages - Method not implemented
    ...    Test objective: The objective is to test that DELETE method is not allowed to delete existing VNF Packages
    ...    Pre-conditions: One or more VNF packages are onboarded in the NFVO.
162
    ...    Reference: clause 10.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1
163
164
165
166
167
168
    ...    Config ID: Config_prod_NFVO
    ...    Applicability: none
    ...    Post-Conditions: The VNF Packages are not deleted by the failed operation
    Send DELETE Request for all VNF Packages
    Check HTTP Response Status Code Is    405
    Check Postcondition VNF Packages Exist