2 Documentation Verify SMO gets 4xx response while issuing o2ims APIs with incorrect data
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 invalid data
21 [documentation] This test case verifies Operate resourceTypes with invalid data
22 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
25 # Expect Response Body ${CURDIR}/schemas/client_errors_properties.json
26 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?filter=(eq,WrongAttrName,anyvalue)
27 # Output Schema response body ${CURDIR}/schemas/.output/client_errors_properties.json
29 log ${res} level=DEBUG
30 Integer response status 400
33 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourceTypes?fields=(resourceTypeId,WrongAttrName)
35 log ${res} level=DEBUG
36 Integer response status 400
39 s2, Operate resourcePool with invalid data
40 [documentation] This test case verifies Operate resourcePool with invalid data
41 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
44 # Expect Response Body ${CURDIR}/schemas/client_errors_properties.json
45 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools?fields=(resourceTypeId,WrongAttrName)
47 log ${res} level=DEBUG
48 Integer response status 400
51 s3, Operate Resource with invalid data
52 [documentation] This test case verifies Operate Resource with invalid data
53 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
56 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools
57 # ${resourcePoolId} input $[0].resourcePoolId
58 ${resourcePoolId} output $[0].resourcePoolId
60 # Expect Response Body ${CURDIR}/schemas/client_errors_properties.json
61 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/resourcePools/${resourcePoolId}/resources?fields=(resourceTypeId,WrongAttrName)
63 log ${res} level=DEBUG
64 Integer response status 400
67 s4, Operate DeploymentManager with invalid data
68 [documentation] This test case verifies Operate DeploymentManager with invalid data
69 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
72 # Expect Response Body ${CURDIR}/schemas/client_errors_properties.json
73 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/deploymentManagers?fields=(deploymentManagerId,WrongAttrName)
75 log ${res} level=DEBUG
76 Integer response status 400
79 s5, Operate Ocloud with invalid data
80 [documentation] This test case verifies Operate Ocloud with invalid data
81 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
84 # Expect Response Body ${CURDIR}/schemas/client_errors_properties.json
85 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1?fields=(resourceId,WrongAttrName)
87 log ${res} level=DEBUG
88 Integer response status 400
91 s6, Operate Inventory Subscription with invalid data
92 [documentation] This test case verifies Operate Inventory Subscription with invalid data
93 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
96 # Expect Response Body ${CURDIR}/schemas/client_errors_properties.json
97 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/subscriptions?fields=(SubscriptionId,WrongAttrName)
99 log ${res} level=DEBUG
100 Integer response status 400
103 s7, Operate Alarm with invalid data
104 [documentation] This test case verifies Operate Alarm with invalid data
105 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
108 # Expect Response Body ${CURDIR}/schemas/client_errors_properties.json
109 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureMonitoring/v1/alarms?fields=(AlarmId,WrongAttrName)
111 log ${res} level=DEBUG
112 Integer response status 400
115 s8, Operate Alarm Subscription with invalid data
116 [documentation] This test case verifies Operate Alarm Subscription with invalid data
117 [tags] ORAN_Compliance ORAN_O2 ORAN_O2IMS ORAN_O2IMS_Client_Errors
120 # Expect Response Body ${CURDIR}/schemas/client_errors_properties.json
121 ${res} GET ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureMonitoring/v1/alarmSubscriptions?fields=(AlarmSubscriptionId,WrongAttrName)
123 log ${res} level=DEBUG
124 Integer response status 400
130 Set Headers {"accept": "application/json"}
131 Set Headers {"Content-Type": "application/json"}
132 Set Headers {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}