2 Documentation Test suite for capwap discover functionality
3 Suite Setup Create Session session http://${CONTROLLER}:${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.txt
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 ${CONTROLLER}
19 Wait Until Keyword Succeeds 10s 5s Run Test Get Discovered WTP
22 [Documentation] Get the details of specific WTP.
23 send discover ${CONTROLLER}
24 Wait Until Keyword Succeeds 10s 5s Run Test Get Specifc WTP
27 Run Test Get Discovered WTP
28 ${resp} RequestsLibrary.Get 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 ${CONTROLLER}
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}
40 List Should Contain Value ${wtp_ip_list} ${expected_ip_addr}
42 Run Test Get Specifc WTP
43 ${expected_ip_addr} get simulated wtpip ${CONTROLLER}
44 ${DISC_SPECIFIC_WTP} catenate SEPARATOR= ${DISC_WTP_REST} discovered-wtps\/ ${expected_ip_addr} \/
45 Log ${DISC_SPECIFIC_WTP}
46 ${resp} RequestsLibrary.Get session ${DISC_SPECIFIC_WTP}
48 Should Be Equal As Strings ${resp.status_code} 200
49 ${result} TO JSON ${resp.content}
50 @{wtp_discovered} Get From Dictionary ${result} discovered-wtps
51 ${wtp_ip_list} Create List ''
52 : FOR ${wtp} IN @{wtp_discovered}
53 \ ${wtp_ip} Get From Dictionary ${wtp} ipv4-addr
54 \ Append to List ${wtp_ip_list} ${wtp_ip}
56 List Should Contain Value ${wtp_ip_list} ${expected_ip_addr}