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}
17 ${RESOURCETYPE_NAME} ${ocloud.oran_o2_app.resourcetype_name}
21 s1, Operate resourceTypes with unsupported method
22 [documentation] This test case verifies Operate resourceTypes with unsupported method
23 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Unsupported_Method
26 # Expect Response Body ${CURDIR}/schemas/unsupported_method_properties.json
27 # ${res} POST ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes
28 # # Output Schema response body ${CURDIR}/schemas/.output/unsupported_method_properties.json
29 # # Clear Expectations
30 # log ${res} level=DEBUG
31 # Integer response status 405
32 # Object response body
34 # ${res} PUT ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes
35 # # Clear Expectations
36 # log ${res} level=DEBUG
37 # Integer response status 405
38 # Object response body
40 # ${res} PATCH ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes
41 # # Clear Expectations
42 # log ${res} level=DEBUG
43 # Integer response status 405
44 # Object response body
46 # ${res} DELETE ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes
47 # # Clear Expectations
48 # log ${res} level=DEBUG
49 # Integer response status 405
50 # Object response body
52 ${resourceTypeId} input 3d19af47-e20d-40f9-ae74-f8cc988a045f
53 Expect Response Body ${CURDIR}/schemas/unsupported_method_properties.json
54 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}
55 # Output Schema response body ${CURDIR}/schemas/.output/unsupported_method_properties.json
57 log ${res} level=DEBUG
58 Integer response status 404
60 ${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'}
62 ${res} POST ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId} ${resouceTypeData}
64 log ${res} level=DEBUG
65 Integer response status 405
68 GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,name,${RESOURCETYPE_NAME})
69 ${resourceTypeId} output $[0].resourceTypeId
70 ${res} PUT ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}
72 log ${res} level=DEBUG
73 Integer response status 405
76 ${res} PATCH ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}
78 log ${res} level=DEBUG
79 Integer response status 405
82 ${res} DELETE ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes/${resourceTypeId}
84 log ${res} level=DEBUG
85 Integer response status 405
90 # s2, Operate resourcePool with unsupported method
91 # [documentation] This test case verifies Operate resourcePool with unsupported method
92 # [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Unsupported_Method
94 s2, Operate Ocloud with unsupported method
95 [documentation] This test case verifies Operate Ocloud with unsupported method
96 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Unsupported_Method
99 # Expect Response Body ${CURDIR}/schemas/unsupported_method_properties.json
100 ${res} POST ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/
101 # Output Schema response body ${CURDIR}/schemas/.output/unsupported_method_properties.json
103 log ${res} level=DEBUG
104 Integer response status 405
107 # ${res} PUT ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1
109 ${res} PUT ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/
111 log ${res} level=DEBUG
112 Integer response status 405
115 ${res} PATCH ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/
117 log ${res} level=DEBUG
118 Integer response status 405
121 ${res} DELETE ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/
123 log ${res} level=DEBUG
124 Integer response status 405
130 Set Headers {"accept": "application/json"}
131 Set Headers {"Content-Type": "application/json"}
132 Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}
133 Set Client Cert ${CURDIR}/../certs/client.pem