Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
Y''[Documentation] robot --outputdir ../../../outputs ./FederationEnablement.robot
... Test Suite to validate the Federation Enablement API (FED) operations.
*** Settings ***
Resource environment/variables.txt
Resource ../../pics.txt
Resource ../../GenericKeywords.robot
Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false
Library OperatingSystem
*** Test Cases ***
TP_MEC_MEC040_SRV_MEF_001_OK
[Documentation]
... Check that the IUT responds with a list of all available systemInfo
... when requested by a MEC Orchestrator - No query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
TP_MEC_MEC040_SRV_MEF_001_OK_02
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - SystemId query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources with query params ${SYSTEM_ID_QUERY_PARAM}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
FOR ${element} IN @{response['body']}
Should Be Equal As Strings ${element}[systemId] ${EXPECTED_SYSTEM_ID}
END
TP_MEC_MEC040_SRV_MEF_001_OK_03
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - Multiple SystemId query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources with query params ${MULTIPLE_SYSTEM_ID_QUERY_PARAM}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
FOR ${element} IN @{response['body']}
IF '''${element}[systemId]''' == '''${EXPECTED_SYSTEM_ID}'''
${item} Set Variable ${TRUE}
END
IF '''${element}[systemId]''' == '''${EXPECTED_SYSTEM_ID2}'''
${item2} Set Variable ${TRUE}
END
END
Should Be True ${item}
Should Be True ${item2}
TP_MEC_MEC040_SRV_MEF_001_OK_04
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - Empty SystemId query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
TP_MEC_MEC040_SRV_MEF_001_OK_05
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - SystemName query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources with query params ${SYSTEM_NAME_QUERY_PARAM}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
FOR ${element} IN @{response['body']}
Should Be Equal As Strings ${element}[systemName] ${EXPECTED_SYSTEM_NAME}
END
TP_MEC_MEC040_SRV_MEF_001_OK_06
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - Multiple SystemName query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources with query params ${MUTIPLE_SYSTEM_NAME_QUERY_PARAM}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
FOR ${element} IN @{response['body']}
IF '''${element}[systemName]''' == '''${EXPECTED_SYSTEM_NAME}'''
${item} Set Variable ${TRUE}
END
IF '''${element}[systemName]''' == '''${EXPECTED_SYSTEM_NAME2}'''
${item2} Set Variable ${TRUE}
END
END
Should Be True ${item}
Should Be True ${item2}
TP_MEC_MEC040_SRV_MEF_001_OK_07
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - Empty SystemName query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources with query params ${EMPTY_SYSTEM_NAME_QUERY_PARAM}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
FOR ${element} IN @{response['body']}
Should Be Equal As Strings ${element}[systemName] ${EMPTY}
END
TP_MEC_MEC040_SRV_MEF_001_OK_08
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - systemProvider query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources with query params ${SYSTEM_PROVIDER_QUERY_PARAM}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
FOR ${element} IN @{response['body']}
Should Be Equal As Strings ${element}[systemProvider] ${EXPECTED_SYSTEM_PROVIDER}
END
TP_MEC_MEC040_SRV_MEF_001_OK_09
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - Multiple systemProvider query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources with query params ${MUTIPLE_SYS_PROVIDER_QUERY_PAR}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
FOR ${element} IN @{response['body']}
IF '''${element}[systemProvider]''' == '''${EXPECTED_SYSTEM_PROVIDER}'''
${item} Set Variable ${TRUE}
END
IF '''${element}[systemProvider]''' == '''${EXPECTED_SYSTEM_PROVIDER2}'''
${item2} Set Variable ${TRUE}
END
END
Should Be True ${item}
Should Be True ${item2}
TP_MEC_MEC040_SRV_MEF_001_OK_10
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - Empty systemProvider query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources with query params ${EMPTY_SYSTEM_PROVIDER_QUERY_PARAM}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
FOR ${element} IN @{response['body']}
Should Be Equal As Strings ${element}[systemProvider] ${EMPTY}
END
TP_MEC_MEC040_SRV_MEF_001_OK_11
[Documentation]
... Check that the IUT responds with a selection of all available systemInfo
... when requested by a MEC Orchestrator - Multiple query parameters
... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2
... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf
Retrieve all system info resources with query params ${FILTER_ON_SYSTEM_ID_AND_NAME}
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is SystemInfoList
${counterSystemId} Set Variable ${0}
${counterSystemName} Set Variable ${0}
FOR ${element} IN @{response['body']}
IF '''${element}[systemId]''' == '''${EXPECTED_SYSTEM_ID}'''
${counterSystemId}= set variable ${counterSystemId+1}
END
IF '''${element}[systemId]''' == '''${EXPECTED_SYSTEM_ID}'''
${counterSystemName}= set variable ${counterSystemName+1}
END
${counterSystemName}= set variable ${counterSystemName+1}
END
Should Be True '${counterSystemName}'>'0'
Should Be True '${counterSystemId}'>'0'
############################################################################
*** Keywords ***
Retrieve all system info resources
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info
${output}= Output response
Set Suite Variable ${response} ${output}
Retrieve all system info resources with query params
[Arguments] ${query_params}
Should Be True ${PIC_MEC_PLAT} == 1
Should Be True ${PIC_SERVICES} == 1
Set Headers {"Accept":"application/json"}
Set Headers {"Content-Type":"*/*"}
Set Headers {"Authorization":"${TOKEN}"}
GET ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info?${query_params}
${output}= Output response
Set Suite Variable ${response} ${output}