- ${data}= Get Data From File ${MR_EXPECTATION_AAI_PNF_REMOVED}
- ${resp} = Put Request mr_sim_session /clear data={"path": "/events/AAI_EVENT/dcae_pmsh_cg/dcae_pmsh_aai_event"}
- Should Be True ${resp.status_code} == 200
- ${resp} = Put Request mr_sim_session /expectation data=${data}
- Should Be True ${resp.status_code} == 201
+ [Arguments] ${expected_contents}
+ ${json_value}= json_from_file ${expected_contents}
+ ${resp}= PostMrCall ${AAI_MR_TOPIC} ${json_value}
+ log ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${count}= Evaluate $resp.json().get('count')
+ log 'JSON Response Code:'${resp}
+
+PostMrCall
+ [Arguments] ${url} ${data}
+ Create Session mr_sim_session ${MR_BASE_URL} verify=false
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= POST On Session mr_sim_session url=${url} json=${data} headers=${headers}
+ [Return] ${resp}
+
+GetSubsCall
+ [Arguments] ${url}
+ Create Session pmsh_session ${PMSH_BASE_URL} verify=false
+ ${resp}= GET On Session pmsh_session url=${url}
+ [Return] ${resp}