2 Documentation Verify SMO succeeds to query inventory with O2ims APIs and correct token
3 # Library REST ssl_verify=False loglevel=DEBUG
4 Library REST ssl_verify=False
5 Variables ${EXECDIR}${/}test_configs.yaml
7 Suite Setup Set REST Headers
10 ${ORAN_HOST_EXTERNAL_IP} ${ocloud.oran_o2_app.api.host}
11 ${ORAN_SERVICE_NODE_PORT} ${ocloud.oran_o2_app.api.node_port}
12 ${GLOBAL_OCLOUD_ID1} ${ocloud.oran_o2_app.g_ocloud_id}
13 ${SMO_TOKEN_DATA} ${ocloud.oran_o2_app.smo_token_data}
14 ${globalLocationId} ${ocloud.oran_o2_app.g_location_id}
16 ${ORAN_O2IMS_ENDPOINT} ${ocloud.oran_o2_app.api.protocol}://${ORAN_HOST_EXTERNAL_IP}:${ORAN_SERVICE_NODE_PORT}
17 ${ORAN_O2IMS_ENDPOINT_DEFAULT_PORT} ${ocloud.oran_o2_app.api.protocol}://${ORAN_HOST_EXTERNAL_IP}
20 s1, query o-cloud detail
21 [documentation] This test case verifies Query OCloud Detail
22 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS
23 # Builtin.Set Log Level DEBUG
24 # Set SSL Verify False
25 # Set Headers {"accept": "application/json"}
26 # Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}
28 Expect Response Body ${CURDIR}/schemas/ocloud_properties.json
29 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/
30 # Output Schema response body ${CURDIR}/schemas/.output/ocloud_properties.json
32 log ${res} level=DEBUG
33 Integer response status 200
34 # Object response body
35 String $.globalcloudId ${GLOBAL_OCLOUD_ID1}
36 # Sometimes serviceUri might not contain the port number in the json response if it is a well-known port.
37 IF ${ORAN_SERVICE_NODE_PORT} == 443 or ${ORAN_SERVICE_NODE_PORT} == 80
38 String $.serviceUri ${ORAN_O2IMS_ENDPOINT} ${ORAN_O2IMS_ENDPOINT_DEFAULT_PORT}
40 String $.serviceUri ${ORAN_O2IMS_ENDPOINT}
44 Expect Response Body ${CURDIR}/schemas/ocloud_allfields_properties.json
45 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1?all_fields
46 # Output Schema response body ${CURDIR}/schemas/.output/ocloud_allfields_properties.json
48 log ${res} level=DEBUG
49 Integer response status 200
51 s2, query resource type list without filter
52 [documentation] This test case verifies Query OCloud resourceTypes without filter
53 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
55 Expect Response Body ${CURDIR}/schemas/resourceTypes_properties.json
56 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes
57 # Output Schema response body ${CURDIR}/schemas/.output/resourceTypes_properties.json
59 log ${res} level=DEBUG
60 Integer response status 200
62 Array $ minItems=1 uniqueItems=true
65 Expect Response Body ${CURDIR}/schemas/resourceTypes_allfields_properties.json
66 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?all_fields
67 # Output Schema response body ${CURDIR}/schemas/.output/resourceTypes_allfields_properties.json
69 log ${res} level=DEBUG
70 Integer response status 200
74 s3, query resource type list with filters
75 [documentation] This test case verifies Query OCloud resourceTypes with filter
76 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
78 Expect Response Body ${CURDIR}/schemas/resourceTypes_properties.json
79 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver)
81 log ${res} level=DEBUG
82 Integer response status 200
84 Array $ minItems=1 maxItems=1
85 # String $[0].resourceTypeId
87 # String $[0].resourceKind
88 # String $[0].resourceClass
89 # String $[0].resourceTypeId
91 s4, query resource type list with selectors
92 [documentation] This test case verifies query resource type list with selectors
93 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
95 Expect Response Body ${CURDIR}/schemas/resourceTypes_properties.json
96 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?fields=name,description
98 log ${res} level=DEBUG
99 Integer response status 200
101 Array $ minItems=1 uniqueItems=true
103 s5, query Resource Type detail
104 [documentation] This test case verifies Query OCloud resourceTypes detail
105 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
107 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver)
108 ${resourceTypeId} output $[0].resourceTypeId
110 Expect Response Body ${CURDIR}/schemas/resourceType_properties.json
111 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}
112 # Output Schema response body ${CURDIR}/schemas/.output/resourceType_properties.json
114 log ${res} level=DEBUG
115 Integer response status 200
119 Expect Response Body ${CURDIR}/schemas/resourceType_allfields_properties.json
120 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}?all_fields
121 # Output Schema response body ${CURDIR}/schemas/.output/resourceType_allfields_properties.json
123 log ${res} level=DEBUG
124 Integer response status 200
126 String $.alarmDictionary.managementInterfaceId "O2IMS"
128 s6, query Resource Pool list without filter
129 [documentation] This test case verifies Query OCloud resourcePools without filter
130 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
132 Expect Response Body ${CURDIR}/schemas/resourcePools_properties.json
133 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
134 # Output Schema response body ${CURDIR}/schemas/.output/resourcePools_properties.json
136 log ${res} level=DEBUG
137 Integer response status 200
139 Array $ minItems=1 uniqueItems=true
142 # # Expect Response Body ${CURDIR}/schemas/resourcePools_allfields_properties.json
143 # ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools?all_fields
144 # Output Schema response body ${CURDIR}/schemas/.output/resourcePools_allfields_properties.json
146 # log ${res} level=DEBUG
147 # Integer response status 200
149 s7, query Resource Pool list with filter
150 [documentation] This test case verifies Query OCloud resourcePools with filter
151 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
154 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
155 ${resourcePoolId} output $[0].resourcePoolId
158 Expect Response Body ${CURDIR}/schemas/resourcePools_properties.json
159 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools?filter=(eq,resourcePoolId,${resourcePoolId})
160 # Output Schema response body ${CURDIR}/schemas/.output/resourcePools_properties.json
162 log ${res} level=DEBUG
163 Integer response status 200
165 Array $ minItems=1 maxItems=1
167 s8, query Resource Pool list with selector
168 [documentation] This test case verifies query Resource Pool list with selector
169 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
171 Expect Response Body ${CURDIR}/schemas/resourcePools_properties.json
172 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
173 # Output Schema response body ${CURDIR}/schemas/.output/resourcePools_properties.json
175 log ${res} level=DEBUG
176 Integer response status 200
178 Array $ minItems=1 uniqueItems=true
180 s9, query Resource Pool detail
181 [documentation] This test case verifies Query OCloud resourcePools detail
182 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
184 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
185 ${resourcePoolId} output $[0].resourcePoolId
187 Expect Response Body ${CURDIR}/schemas/resourcePool_properties.json
188 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}
189 # Output Schema response body ${CURDIR}/schemas/.output/resourcePool_properties.json
191 log ${res} level=DEBUG
192 Integer response status 200
196 Expect Response Body ${CURDIR}/schemas/resourcePool_allfields_properties.json
197 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}?all_fields
198 # Output Schema response body ${CURDIR}/schemas/.output/resourcePool_allfields_properties.json
200 log ${res} level=DEBUG
201 Integer response status 200
204 s10, query Resource list of a Resource Pool without filter
205 [documentation] This test case verifies Query OCloud Resource list without filter
206 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
208 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
209 @{resourcePools} output $
210 FOR ${resourcePool} IN @{resourcePools}
211 # ${resourcePoolId} output $[0].resourcePoolId
212 ${resourcePoolId} input ${resourcePool}[resourcePoolId]
214 Expect Response Body ${CURDIR}/schemas/resources_properties.json
215 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources
216 # Output Schema response body ${CURDIR}/schemas/.output/resources_properties.json
218 log ${res} level=DEBUG
219 Integer response status 200
221 Array $ minItems=1 uniqueItems=true
225 s11, query Resource list of a Resource Pool with filter
226 [documentation] This test case verifies Query OCloud Resource list with filter
227 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
229 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver)
230 ${resourceTypeId} output $[0].resourceTypeId
232 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
233 @{resourcePools} output $
234 FOR ${resourcePool} IN @{resourcePools}
235 # ${resourcePoolId} output $[0].resourcePoolId
236 ${resourcePoolId} input ${resourcePool}[resourcePoolId]
238 Expect Response Body ${CURDIR}/schemas/resources_properties.json
239 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?filter=(eq,resourceTypeId,${resourceTypeId})
240 # Output Schema response body ${CURDIR}/schemas/.output/resources_properties.json
242 log ${res} level=DEBUG
243 Integer response status 200
245 Array $ minItems=1 uniqueItems=true
249 s12, query Resource list of a Resource Pool with selector
250 [documentation] This test case verifies query Resource list of a Resource Pool with selector
251 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
253 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver)
254 ${resourceTypeId} output $[0].resourceTypeId
256 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
257 @{resourcePools} output $
258 FOR ${resourcePool} IN @{resourcePools}
259 # ${resourcePoolId} output $[0].resourcePoolId
260 ${resourcePoolId} input ${resourcePool}[resourcePoolId]
262 Expect Response Body ${CURDIR}/schemas/resources_properties.json
263 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?exclude_default
264 # Output Schema response body ${CURDIR}/schemas/.output/resources_properties.json
266 log ${res} level=DEBUG
267 Integer response status 200
269 Array $ minItems=1 uniqueItems=true
272 s13, query Resource detail
273 [documentation] This test case verifies Query OCloud Resource Detail of pserver
274 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
276 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver)
277 ${resourceTypeId} output $[0].resourceTypeId
278 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
279 @{resourcePools} output $
280 FOR ${resourcePool} IN @{resourcePools}
281 # ${resourcePoolId} output $[0].resourcePoolId
282 ${resourcePoolId} input ${resourcePool}[resourcePoolId]
285 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?filter=(eq,resourceTypeId,${resourceTypeId})
286 @{resources} output $
287 ${length1}= Get Length ${resources}
289 log "resourcePool with id: ${resourcePoolId} has no resource"
292 ${resourceId} output $[0].resourceId
294 Expect Response Body ${CURDIR}/schemas/resource_properties.json
295 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources/${resourceId}
297 # Output Schema response body ${CURDIR}/schemas/.output/resource_properties.json
299 log ${res} level=DEBUG
300 Integer response status 200
305 Expect Response Body ${CURDIR}/schemas/resource_allfields_properties.json
306 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources/${resourceId}?all_fields
307 # Output Schema response body ${CURDIR}/schemas/.output/resource_allfields_properties.json
309 log ${res} level=DEBUG
310 Integer response status 200
311 ${description} output $.description
312 should contain ${description} hostname:
313 should contain ${description} id:
314 should contain ${description} personality:
315 should contain ${description} subfunctions:
316 should contain ${description} max_cpu_mhz_allowed:
317 should contain ${description} install_state:
318 should contain ${description} operational:
319 should contain ${description} availability:
320 should contain ${description} administrative:
321 should contain ${description} boot_device:
322 should contain ${description} mgmt_mac:
323 should contain ${description} clock_synchronization:
324 should contain ${description} rootfs_device:
326 String $.extensions['hostname']
327 Integer $.extensions['id']
328 String $.extensions['personality']
329 # String $.extensions['max_cpu_mhz_allowed']
330 # String $.extensions['install_state']
331 String $.extensions['operational']
332 String $.extensions['availability']
333 String $.extensions['administrative']
334 String $.extensions['boot_device']
335 String $.extensions['rootfs_device']
336 String $.extensions['subfunctions']
337 String $.extensions['mgmt_mac']
338 String $.extensions['clock_synchronization']
344 s14, query Resource detail of an accelerator
345 [documentation] This test case verifies Query OCloud Resource Detail of an accelerator
346 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
348 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver_acc)
349 ${resourceTypeId} output $[0].resourceTypeId
350 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
351 @{resourcePools} output $
352 FOR ${resourcePool} IN @{resourcePools}
353 # ${resourcePoolId} output $[0].resourcePoolId
354 ${resourcePoolId} input ${resourcePool}[resourcePoolId]
357 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?filter=(eq,resourceTypeId,${resourceTypeId})
358 @{resources} output $
359 ${length1}= Get Length ${resources}
361 log "resourcePool with id: ${resourcePoolId} has no resource of accelerator"
364 ${resourceId} output $[0].resourceId
366 Expect Response Body ${CURDIR}/schemas/resource_allfields_properties.json
367 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources/${resourceId}?all_fields
369 # Output Schema response body ${CURDIR}/schemas/.output/resource_properties.json
371 log ${res} level=DEBUG
372 Integer response status 200
374 ${description} output $.description
375 should contain ${description} name:
376 should contain ${description} pdevice:
377 should contain ${description} pciaddr:
378 should contain ${description} pvendor_id:
379 should contain ${description} pvendor:
380 should contain ${description} pclass_id:
381 should contain ${description} pclass:
382 should contain ${description} psvendor:
383 should contain ${description} psdevice:
384 should contain ${description} sriov_totalvfs:
385 should contain ${description} sriov_numvfs:
386 should contain ${description} numa_node:
387 # should contain ${description} name:
388 # should contain ${description} class:
389 # should contain ${description} vendor:
391 String $.extensions['name']
392 String $.extensions['pdevice']
393 String $.extensions['pciaddr']
394 String $.extensions['pvendor_id']
395 String $.extensions['pvendor']
396 String $.extensions['pclass_id']
397 String $.extensions['pclass']
398 String $.extensions['psvendor']
399 String $.extensions['psdevice']
400 # Integer $.extensions['sriov_totalvfs']
401 Integer $.extensions['sriov_numvfs']
402 Integer $.extensions['numa_node']
407 s15, query Resource detail of an cpu
408 [documentation] This test case verifies Query OCloud Resource Detail of an cpu
409 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
411 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver_cpu)
412 ${resourceTypeId} output $[0].resourceTypeId
413 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
414 @{resourcePools} output $
415 FOR ${resourcePool} IN @{resourcePools}
416 # ${resourcePoolId} output $[0].resourcePoolId
417 ${resourcePoolId} input ${resourcePool}[resourcePoolId]
420 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?filter=(eq,resourceTypeId,${resourceTypeId})
421 @{resources} output $
422 ${length1}= Get Length ${resources}
424 log "resourcePool with id: ${resourcePoolId} has no resource of accelerator"
427 ${resourceId} output $[0].resourceId
429 Expect Response Body ${CURDIR}/schemas/resource_allfields_properties.json
430 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources/${resourceId}?all_fields
432 # Output Schema response body ${CURDIR}/schemas/.output/resource_properties.json
434 log ${res} level=DEBUG
435 Integer response status 200
437 ${description} output $.description
438 should contain ${description} core:
439 should contain ${description} thread:
440 should contain ${description} allocated_function:
441 should contain ${description} numa_node:
442 should contain ${description} cpu_model:
443 should contain ${description} cpu_family:
444 should contain ${description} cpu:
446 Integer $.extensions['cpu']
447 Integer $.extensions['core']
448 Integer $.extensions['thread']
449 String $.extensions['allocated_function']
450 Integer $.extensions['numa_node']
451 String $.extensions['cpu_model']
452 String $.extensions['cpu_family']
458 s16, query Resource detail of an interface
459 [documentation] This test case verifies Query OCloud Resource Detail of an interface
460 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
462 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver_if)
463 ${resourceTypeId} output $[0].resourceTypeId
464 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
465 @{resourcePools} output $
466 FOR ${resourcePool} IN @{resourcePools}
467 # ${resourcePoolId} output $[0].resourcePoolId
468 ${resourcePoolId} input ${resourcePool}[resourcePoolId]
471 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?filter=(eq,resourceTypeId,${resourceTypeId})
472 @{resources} output $
473 ${length1}= Get Length ${resources}
475 log "resourcePool with id: ${resourcePoolId} has no resource of accelerator"
478 ${resourceId} output $[0].resourceId
480 Expect Response Body ${CURDIR}/schemas/resource_allfields_properties.json
481 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources/${resourceId}?all_fields
483 # Output Schema response body ${CURDIR}/schemas/.output/resource_properties.json
485 log ${res} level=DEBUG
486 Integer response status 200
488 ${description} output $.description
489 should contain ${description} ifname:
490 should contain ${description} iftype:
491 should contain ${description} imac:
492 should contain ${description} vlan_id:
493 should contain ${description} imtu:
494 should contain ${description} ifclass:
495 should contain ${description} uses:
496 should contain ${description} max_tx_rate:
497 should contain ${description} sriov_vf_driver:
498 should contain ${description} sriov_numvfs:
499 should contain ${description} ptp_role:
501 String $.extensions['ifname']
502 String $.extensions['iftype']
503 String $.extensions['imac']
504 # Integer $.extensions['vlan_id']
505 Integer $.extensions['imtu']
506 # String $.extensions['ifclass']
507 # String $.extensions['uses']
508 # Integer $.extensions['max_tx_rate']
509 # String $.extensions['sriov_vf_driver']
510 # Integer $.extensions['sriov_numvfs']
511 # String $.extensions['ptp_role']
517 s17, query Resource detail of a memory
518 [documentation] This test case verifies Query OCloud Resource Detail of a memory
519 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
521 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver_mem)
522 ${resourceTypeId} output $[0].resourceTypeId
523 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
524 @{resourcePools} output $
525 FOR ${resourcePool} IN @{resourcePools}
526 # ${resourcePoolId} output $[0].resourcePoolId
527 ${resourcePoolId} input ${resourcePool}[resourcePoolId]
530 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?filter=(eq,resourceTypeId,${resourceTypeId})
531 @{resources} output $
532 ${length1}= Get Length ${resources}
534 log "resourcePool with id: ${resourcePoolId} has no resource of accelerator"
537 ${resourceId} output $[0].resourceId
539 Expect Response Body ${CURDIR}/schemas/resource_allfields_properties.json
540 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources/${resourceId}?all_fields
542 # Output Schema response body ${CURDIR}/schemas/.output/resource_properties.json
544 log ${res} level=DEBUG
545 Integer response status 200
547 ${description} output $.description
548 should contain ${description} memtotal_mib:
549 should contain ${description} memavail_mib:
550 should contain ${description} vm_hugepages_use_1G:
551 should contain ${description} vm_hugepages_possible_1G:
552 should contain ${description} hugepages_configured:
553 should contain ${description} vm_hugepages_avail_1G:
554 should contain ${description} vm_hugepages_nr_1G:
555 should contain ${description} vm_hugepages_nr_4K:
556 should contain ${description} vm_hugepages_nr_2M:
557 should contain ${description} numa_node:
558 should contain ${description} vm_hugepages_possible_2M:
559 should contain ${description} vm_hugepages_avail_2M:
560 should contain ${description} platform_reserved_mib:
562 Integer $.extensions['memtotal_mib']
563 Integer $.extensions['memavail_mib']
564 # String $.extensions['vm_hugepages_use_1G']
565 Integer $.extensions['vm_hugepages_possible_1G']
566 # String $.extensions['hugepages_configured']
567 Integer $.extensions['vm_hugepages_avail_1G']
568 Integer $.extensions['vm_hugepages_nr_1G']
569 Integer $.extensions['vm_hugepages_nr_4K']
570 Integer $.extensions['vm_hugepages_nr_2M']
571 Integer $.extensions['vm_hugepages_possible_2M']
572 Integer $.extensions['vm_hugepages_avail_2M']
573 Integer $.extensions['platform_reserved_mib']
574 Integer $.extensions['numa_node']
579 s18, query Resource detail of an ethernet port
580 [documentation] This test case verifies Query OCloud Resource Detail of an ethernet port
581 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Inventory
583 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver_ethernet)
584 ${resourceTypeId} output $[0].resourceTypeId
585 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
586 @{resourcePools} output $
587 FOR ${resourcePool} IN @{resourcePools}
588 # ${resourcePoolId} output $[0].resourcePoolId
589 ${resourcePoolId} input ${resourcePool}[resourcePoolId]
592 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?filter=(eq,resourceTypeId,${resourceTypeId})
593 @{resources} output $
594 ${length1}= Get Length ${resources}
596 log "resourcePool with id: ${resourcePoolId} has no resource of accelerator"
599 ${resourceId} output $[0].resourceId
601 Expect Response Body ${CURDIR}/schemas/resource_allfields_properties.json
602 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources/${resourceId}?all_fields
604 # Output Schema response body ${CURDIR}/schemas/.output/resource_properties.json
606 log ${res} level=DEBUG
607 Integer response status 200
609 ${description} output $.description
610 should contain ${description} name:
611 should contain ${description} pdevice:
612 should contain ${description} pciaddr:
613 should contain ${description} mac:
614 should contain ${description} dev_id:
615 should contain ${description} pclass:
616 should contain ${description} psvendor:
617 should contain ${description} psdevice:
618 should contain ${description} sriov_totalvfs:
619 should contain ${description} sriov_numvfs:
620 should contain ${description} numa_node:
621 should contain ${description} capabilities:
622 should contain ${description} type:
623 should contain ${description} driver:
625 String $.extensions['name']
626 String $.extensions['pdevice']
627 String $.extensions['pciaddr']
628 String $.extensions['mac']
629 Integer $.extensions['dev_id']
630 String $.extensions['pclass']
631 String $.extensions['psvendor']
632 String $.extensions['psdevice']
633 # Integer $.extensions['sriov_totalvfs']
634 Integer $.extensions['sriov_numvfs']
635 Integer $.extensions['numa_node']
636 # Integer $.extensions['capabilities']
637 String $.extensions['type']
638 String $.extensions['driver']
645 Set Headers {"accept": "application/json"}
646 Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}
647 Set Client Cert ${CURDIR}/../certs/client.pem