Suchitra Vemuri | ff82532 | 2018-09-07 14:00:04 -0700 | [diff] [blame] | 1 | *** Settings *** |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 2 | Documentation Test successful ping from end-end |
Suchitra Vemuri | ff82532 | 2018-09-07 14:00:04 -0700 | [diff] [blame] | 3 | Suite Setup Read InputFile |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 4 | #Suite Teardown Teardown |
Suchitra Vemuri | ff82532 | 2018-09-07 14:00:04 -0700 | [diff] [blame] | 5 | Library Collections |
| 6 | Library String |
| 7 | Library OperatingSystem |
| 8 | Library XML |
| 9 | Library RequestsLibrary |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 10 | Library ../../Framework/utils/utils.py |
| 11 | Resource ../../Framework/utils/utils.robot |
| 12 | Library ../../Framework/restApi.py |
| 13 | Resource ../../Framework/Subscriber.robot |
| 14 | Resource ../../Framework/ATTWorkFlowDriver.robot |
| 15 | Resource ../../Framework/ONU.robot |
| 16 | Resource ../../Framework/DHCP.robot |
| 17 | Variables ../../Properties/RestApiProperties.py |
Suchitra Vemuri | ff82532 | 2018-09-07 14:00:04 -0700 | [diff] [blame] | 18 | |
| 19 | *** Variables *** |
Kailash Khalasi | 30a6a39 | 2018-09-10 14:32:39 -0700 | [diff] [blame] | 20 | ${WHITELIST_PATHFILE} ${CURDIR}/data/ATTWhiteList.json |
| 21 | ${SUBSCRIBER_PATHFILE} ${CURDIR}/data/ATTSubscriber.json |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 22 | ${src_ip} X.X.X.X |
| 23 | ${src_gateway} X.X.X.X |
| 24 | ${src_user} user |
| 25 | ${src_pass} pass |
| 26 | ${src_iface} eth0 |
| 27 | ${dst_ip} X.X.X.X |
| 28 | ${dst_user} user |
| 29 | ${dst_pass} pass |
| 30 | ${dst_gateway} X.X.X.X |
| 31 | ${dst_host_ip} X.X.X.X |
Suchitra Vemuri | ff82532 | 2018-09-07 14:00:04 -0700 | [diff] [blame] | 32 | |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 33 | *** Test Cases *** |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 34 | Validate ONU States |
| 35 | [Documentation] Validate status field in ONU List |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 36 | Wait Until Keyword Succeeds 60s 2s Validate ONU States ACTIVE ENABLED |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 37 | |
| 38 | Validate states in ATT WorkFlowDriver Service Instances |
| 39 | [Documentation] Validates necessary states for entries in workflow driver service instance list |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 40 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI valid AWAITING |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 41 | |
| 42 | Validate Subscriber State |
| 43 | [Documentation] Validate subscriber status in the rcordsubscriber list |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 44 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status AWAITING-AUTH |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 45 | |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 46 | Send Subscriber Authentication |
| 47 | [Documentation] Sends a successful 802.1x EAPOL message from the subscriber |
| 48 | Send EAPOL Message ${src_ip} ${src_user} ${src_pass} ${src_iface} wpa_supplicant.conf |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 49 | |
| 50 | Validate states in ATT WorkFlowDriver instances after subscriber authentication |
| 51 | [Documentation] Validate proper states on the service instances after authentication |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 52 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI valid APPROVED |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 53 | |
| 54 | Re-Validate Subscriber State |
| 55 | [Documentation] Validate subscriber status in the rcordsubscriber list |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 56 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status ENABLED |
| 57 | |
| 58 | Execute Dhclient on RG |
| 59 | [Documentation] Run dhclient on the dataplane interface on the RG |
| 60 | Send Dhclient Request ${src_ip} ${src_user} ${src_pass} ${src_iface} |
| 61 | |
| 62 | Test E2E Connectivity |
| 63 | [Documentation] Test pings after subscriber has been authenticated + enabled |
| 64 | Wait Until Keyword Succeeds 60s 2s Test Ping PASS ${src_ip} ${src_user} ${src_pass} ${dst_host_ip} |
Suchitra Vemuri | ff82532 | 2018-09-07 14:00:04 -0700 | [diff] [blame] | 65 | |
| 66 | *** Keywords *** |
| 67 | Read InputFile |
Kailash Khalasi | 30a6a39 | 2018-09-10 14:32:39 -0700 | [diff] [blame] | 68 | ${AttWhiteListList}= utils.jsonToList ${WHITELIST_PATHFILE} AttWhiteListInfo |
| 69 | Set Suite Variable ${alist} ${AttWhiteListList} |
| 70 | ${AttWhiteListList} = Get Variable Value ${alist} |
Suchitra Vemuri | ff82532 | 2018-09-07 14:00:04 -0700 | [diff] [blame] | 71 | ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0 |
| 72 | ${onu_device}= Get From Dictionary ${AttWhiteListDict} serial_number |
| 73 | Log ${onu_device} |
Suchitra Vemuri | ff82532 | 2018-09-07 14:00:04 -0700 | [diff] [blame] | 74 | Set Global Variable ${onu_device} |
Kailash Khalasi | 30a6a39 | 2018-09-10 14:32:39 -0700 | [diff] [blame] | 75 | ${SubscriberList}= utils.jsonToList ${SUBSCRIBER_PATHFILE} SubscriberInfo |
| 76 | Set Global Variable ${slist} ${SubscriberList} |
Suchitra Vemuri | ff82532 | 2018-09-07 14:00:04 -0700 | [diff] [blame] | 77 | |
Suchitra Vemuri | 32fc2f2 | 2018-09-10 12:06:01 -0700 | [diff] [blame] | 78 | Teardown |
Kailash Khalasi | c8dfd0d | 2018-09-11 09:54:43 -0700 | [diff] [blame] | 79 | [Documentation] Delete xos objects and kill process on src host |
| 80 | Kill Linux Process ${src_ip} ${src_user} ${src_pass} [w]pa_supplicant |
| 81 | Kill Linux Process ${src_ip} ${src_user} ${src_pass} [d]hclient |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 82 | Clean Up Objects ${VOLT_SUBSCRIBER} |
Kailash Khalasi | c8dfd0d | 2018-09-11 09:54:43 -0700 | [diff] [blame] | 83 | Clean Up Objects ${VOLT_DEVICE} |
| 84 | Clean Up Objects ${ATT_WHITELIST} |
Kailash Khalasi | a0810ce | 2018-09-10 13:03:27 -0700 | [diff] [blame] | 85 | |
| 86 | Validate ONU States |
| 87 | [Arguments] ${expected_op_status} ${expected_admin_status} |
| 88 | ${operational_status} ${admin_status} ONU Status Check ${onu_device} |
| 89 | Should Be Equal ${operational_status} ${expected_op_status} |
| 90 | Should Be Equal ${admin_status} ${expected_admin_status} |
| 91 | |
| 92 | Validate ATT Workflow Driver SI |
| 93 | [Arguments] ${expected_status} ${expected_auth_status} |
| 94 | ${status} ${authentication_status} Service Instance Status Check ${onu_device} |
| 95 | Should Be Equal ${status} ${expected_status} |
| 96 | Should Be Equal ${authentication_status} ${expected_auth_status} |
| 97 | |
| 98 | Validate Subscriber Status |
| 99 | [Arguments] ${exepected_status} |
| 100 | ${status} Subscriber Status Check ${onu_device} |
Kailash Khalasi | c8dfd0d | 2018-09-11 09:54:43 -0700 | [diff] [blame] | 101 | Should Be Equal ${status} ${exepected_status} |