initial seba-in-a-box functional tests
Change-Id: I955888d602e184b8986ef21e4969fd55b5368325
diff --git a/src/test/cord-api/Framework/ONU.robot b/src/test/cord-api/Framework/ONU.robot
index e5b7a2e..1b9c278 100644
--- a/src/test/cord-api/Framework/ONU.robot
+++ b/src/test/cord-api/Framework/ONU.robot
@@ -28,8 +28,19 @@
${api_result}= restApi.ApiPost ONU_DEVICE ${onu_dictionary}
Should Be True ${api_result}
+Retrieve ONU Device
+ [Arguments] ${serial_number}
+ [Documentation] Returns the onu device id based on the onu's serial number
+ ${json_result}= restApi.ApiGet ONU_DEVICE
+ Log ${json_result}
+ Log To Console ${json_result}
+ ${json_result_list}= Get From dictionary ${json_result} items
+ ${getJsonDict}= utils.getDictFromListOfDict ${json_result_list} serial_number ${serial_number}
+ ${id}= Get From Dictionary ${getJsonDict} id
+ [Return] ${id}
+
Delete ONU Device
[Arguments] ${id}
[Documentation] Sends a DELETE to delete an onu device in XOS
${api_result}= restApi.ApiChameleonDelete ONU_DEVICE ${id}
- Should Be True ${api_result}
\ No newline at end of file
+ Should Be True ${api_result}