2 Documentation Verify SMO get 405 while sending o2ims APIs with unsupported method
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}
20 s1, Operate resourceTypes with unsupported method
21 [documentation] This test case verifies Operate resourceTypes with unsupported method
22 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Unsupported_Method
25 # Expect Response Body ${CURDIR}/schemas/unsupported_method_properties.json
26 # ${res} POST ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes
27 # # Output Schema response body ${CURDIR}/schemas/.output/unsupported_method_properties.json
28 # # Clear Expectations
29 # log ${res} level=DEBUG
30 # Integer response status 405
31 # Object response body
33 # ${res} PUT ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes
34 # # Clear Expectations
35 # log ${res} level=DEBUG
36 # Integer response status 405
37 # Object response body
39 # ${res} PATCH ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes
40 # # Clear Expectations
41 # log ${res} level=DEBUG
42 # Integer response status 405
43 # Object response body
45 # ${res} DELETE ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes
46 # # Clear Expectations
47 # log ${res} level=DEBUG
48 # Integer response status 405
49 # Object response body
51 ${resourceTypeId} input 3d19af47-e20d-40f9-ae74-f8cc988a045f
52 Expect Response Body ${CURDIR}/schemas/unsupported_method_properties.json
53 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}
54 # Output Schema response body ${CURDIR}/schemas/.output/unsupported_method_properties.json
56 log ${res} level=DEBUG
57 Integer response status 404
59 ${resouceTypeData} input {'description': 'An ethernet resource of the physical server', 'name': '5af55345-enp61s0f0', 'parentId': '5af55345-134a-406c-93b6-c5e10318afa5', 'resourceId': '016977ee-c0c3-4e5d-9e53-2bf1d6448aa5', 'resourcePoolId': 'ce2eec13-24b0-4cca-aa54-548be6cc985b','resourceTypeId': '3d19af47-e20d-40f9-ae74-f8cc988a045f'}
61 ${res} POST ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId} ${resouceTypeData}
63 log ${res} level=DEBUG
64 Integer response status 405
67 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,pserver)
68 ${resourceTypeId} output $[0].resourceTypeId
69 ${res} PUT ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}
71 log ${res} level=DEBUG
72 Integer response status 405
75 ${res} PATCH ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}
77 log ${res} level=DEBUG
78 Integer response status 405
81 ${res} DELETE ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}
83 log ${res} level=DEBUG
84 Integer response status 405
89 # s2, Operate resourcePool with unsupported method
90 # [documentation] This test case verifies Operate resourcePool with unsupported method
91 # [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Unsupported_Method
93 s2, Operate Ocloud with unsupported method
94 [documentation] This test case verifies Operate Ocloud with unsupported method
95 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Unsupported_Method
98 # Expect Response Body ${CURDIR}/schemas/unsupported_method_properties.json
99 ${res} POST ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/
100 # Output Schema response body ${CURDIR}/schemas/.output/unsupported_method_properties.json
102 log ${res} level=DEBUG
103 Integer response status 405
106 # ${res} PUT ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1
108 ${res} PUT ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/
110 log ${res} level=DEBUG
111 Integer response status 405
114 ${res} PATCH ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/
116 log ${res} level=DEBUG
117 Integer response status 405
120 ${res} DELETE ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/
122 log ${res} level=DEBUG
123 Integer response status 405
129 Set Headers {"accept": "application/json"}
130 Set Headers {"Content-Type": "application/json"}
131 Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}