Suchitra Vemuri | 2c73426 | 2018-09-06 14:34:42 -0700 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Library to check the status in ONU List |
| 3 | Library Collections |
| 4 | Library String |
| 5 | Library OperatingSystem |
| 6 | Library XML |
| 7 | Library RequestsLibrary |
| 8 | Library ../Framework/utils/utils.py |
| 9 | Library ../Framework/restApi.py |
| 10 | |
| 11 | *** Keywords *** |
| 12 | ONU Status Check |
| 13 | [Arguments] ${onu_device} |
| 14 | [Documentation] Returns "operational_status" and "admin_status" of a particular ONU device from "onu device list" |
| 15 | ${json_result}= restApi.ApiGet ONU_DEVICE |
| 16 | Log ${json_result} |
| 17 | ${json_result_list}= Get From dictionary ${json_result} items |
| 18 | ${getJsonDict}= utils.getDictFromListOfDict ${json_result_list} serial_number ${onu_device} |
| 19 | ${operational_status}= Get From Dictionary ${getJsonDict} oper_status |
| 20 | ${admin_status}= Get From Dictionary ${getJsonDict} admin_state |
| 21 | [Return] ${operational_status} ${admin_status} |