Suchitra Vemuri | 2c73426 | 2018-09-06 14:34:42 -0700 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Library to retrieve status fields from ATT WorkFlow Driver Service Instance 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 | Service Instance Status Check |
| 13 | [Arguments] ${onu_device} |
| 14 | [Documentation] Returns Status and authentication_state field values from att work flow driver for a particular ONU device |
| 15 | ${json_result}= restApi.ApiGet ATT_SERVICEINSTANCES |
| 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 | ${status}= Get From Dictionary ${getJsonDict} valid |
| 20 | ${authentication_status}= Get From Dictionary ${getJsonDict} authentication_state |
| 21 | [Return] ${status} ${authentication_status} |
Kailash Khalasi | 30a6a39 | 2018-09-10 14:32:39 -0700 | [diff] [blame] | 22 | |
| 23 | Create Whitelist Entry |
| 24 | [Arguments] ${entry_list} ${list_index} |
| 25 | [Documentation] Sends a POST to create an att whitelist in XOS |
| 26 | ${elist} = Get Variable Value ${entry_list} |
| 27 | ${entry_dictionary}= utils.listToDict ${elist} ${list_index} |
| 28 | ${api_result}= restApi.ApiPost ATT_WHITELIST ${entry_dictionary} |
| 29 | Should Be True ${api_result} |
| 30 | ${AttWhiteList_Id}= Get From Dictionary ${api_result} id |
| 31 | Set Global Variable ${AttWhiteList_Id} |
| 32 | [Return] ${AttWhiteList_Id} |
| 33 | |
| 34 | Delete Whitelist Entry |
| 35 | [Arguments] ${id} |
| 36 | [Documentation] Sends a DELETE to delete an att whitelist in XOS |
| 37 | ${api_result}= restApi.ApiChameleonDelete ATT_WHITELIST ${id} |
| 38 | Should Be True ${api_result} |