2 Documentation Test suite for capwap discover functionality
3 Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
4 Suite Teardown Delete All Sessions
5 Library RequestsLibrary
6 Library ../../../libraries/Common.py
7 Variables ../../../variables/Variables.py
8 Resource ../../../libraries/Utils.robot
10 Library ../../../libraries/CapwapLibrary.py
13 ${DISC_WTP_REST} /restconf/operational/capwap-impl:capwap-ac-root/
17 [Documentation] Get the WTP Discoverd
18 send discover ${ODL_SYSTEM_IP}
19 Wait Until Keyword Succeeds 10s 5s Run Test Get Discovered WTP
22 [Documentation] Get the details of specific WTP.
23 send discover ${ODL_SYSTEM_IP}
24 Wait Until Keyword Succeeds 10s 5s Run Test Get Specifc WTP
27 Run Test Get Discovered WTP
28 ${resp} RequestsLibrary.Get Request session ${DISC_WTP_REST}
30 Should Be Equal As Strings ${resp.status_code} 200
31 ${result} TO JSON ${resp.content}
32 ${ac_Root} Get From Dictionary ${result} capwap-ac-root
33 @{wtp_discovered} Get From Dictionary ${ac_Root} discovered-wtps
34 ${expected_ip_addr} get simulated wtpip ${ODL_SYSTEM_IP}
35 ${wtp_ip_list} Create List ''
36 FOR ${wtp} IN @{wtp_discovered}
37 ${wtp_ip} Get From Dictionary ${wtp} ipv4-addr
38 Append to List ${wtp_ip_list} ${wtp_ip}
41 List Should Contain Value ${wtp_ip_list} ${expected_ip_addr}
43 Run Test Get Specifc WTP
44 ${expected_ip_addr} get simulated wtpip ${ODL_SYSTEM_IP}
45 ${DISC_SPECIFIC_WTP} catenate SEPARATOR= ${DISC_WTP_REST} discovered-wtps\/ ${expected_ip_addr} \/
46 Log ${DISC_SPECIFIC_WTP}
47 ${resp} RequestsLibrary.Get Request session ${DISC_SPECIFIC_WTP}
49 Should Be Equal As Strings ${resp.status_code} 200
50 ${result} TO JSON ${resp.content}
51 @{wtp_discovered} Get From Dictionary ${result} discovered-wtps
52 ${wtp_ip_list} Create List ''
53 FOR ${wtp} IN @{wtp_discovered}
54 ${wtp_ip} Get From Dictionary ${wtp} ipv4-addr
55 Append to List ${wtp_ip_list} ${wtp_ip}
58 List Should Contain Value ${wtp_ip_list} ${expected_ip_addr}