2 Documentation Verify SMO gets client error response while issuing requests with incorrect APIs
3 # Library REST ssl_verify=False loglevel=DEBUG
4 Library REST ssl_verify=False
5 Variables ${EXECDIR}${/}test_configs.yaml
8 Suite Setup Set REST Headers
11 ${ORAN_HOST_EXTERNAL_IP} ${ocloud.oran_o2_app.api.host}
12 ${ORAN_SERVICE_NODE_PORT} ${ocloud.oran_o2_app.api.node_port}
13 ${GLOBAL_OCLOUD_ID1} ${ocloud.oran_o2_app.g_ocloud_id}
14 ${SMO_TOKEN_DATA} ${ocloud.oran_o2_app.smo_token_data}
15 ${globalLocationId} ${ocloud.oran_o2_app.g_location_id}
17 ${ORAN_O2IMS_ENDPOINT} ${ocloud.oran_o2_app.api.protocol}://${ORAN_HOST_EXTERNAL_IP}:${ORAN_SERVICE_NODE_PORT}
18 # Wrong port number set to 1
19 ${WRONG_PORT_ORAN_O2IMS_ENDPOINT} ${ocloud.oran_o2_app.api.protocol}://${ORAN_HOST_EXTERNAL_IP}:1
24 s1, Verify query with wrong port does not receive API response.
25 [documentation] Verify query with wrong port does not receive API response.
26 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
29 Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}
31 ${res} GET ${WRONG_PORT_ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1
32 EXCEPT ConnectionError: * type=glob
33 log PASS:query with wrong port got error code level=DEBUG
36 s2, Verify query with wrong url got error code.
37 [documentation] Verify query with wrong url got error code.
38 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
41 Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}
42 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/deploymentManagersWrongURL
43 log ${res} level=DEBUG
44 Integer response status 404
45 # Object response body
47 s3, Verify query with wrong api version got error code.
48 [documentation] Verify query with wrong api version got error code.
49 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
52 Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}
53 Expect Response Body ${CURDIR}${/}..${/}o2ims_compliance${/}schemas${/}client_errors_properties.json
54 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v2/deploymentManagers
56 log ${res} level=DEBUG
57 Integer response status 404
58 # Object response body
60 s4, Verify query with wrong deploymentManagerID got error code.
61 [documentation] Verify query with wrong deploymentManagerID got error code.
62 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
65 Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}
66 Expect Response Body ${CURDIR}${/}..${/}o2ims_compliance${/}schemas${/}client_errors_properties.json
67 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/deploymentManagers/wrongDeploymentManagerID
69 log ${res} level=DEBUG
70 Integer response status 404
76 Set Headers {"accept": "application/json"}
77 Set Headers {"Content-Type": "application/json"}
78 # Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}
79 Set Client Cert ${CURDIR}/../certs/client.pem