2 Documentation LISP southbound performance tests
3 Suite Setup Prepare Environment
4 Suite Teardown Destroy Environment
7 Library OperatingSystem
8 Library RequestsLibrary
10 Resource ../../../libraries/Utils.robot
11 Resource ../../../libraries/LISPFlowMapping.robot
12 Variables ../../../variables/Variables.py
16 ${LISP_SCAPY} https://raw.githubusercontent.com/ljakab/py-lispnetworking/opendaylight/lisp.py
17 ${TOOLS_DIR} ${CURDIR}/../../../../tools/odl-lispflowmapping-performance-tests/
18 ${PCAP_CREATOR} ${TOOLS_DIR}/create_lisp_control_plane_pcap.py
19 ${MAPPING_BLASTER} ${TOOLS_DIR}/mapping_blaster.py
22 ${REPLAY_FILE_MREQ} encapsulated-map-requests-sequential.pcap
23 ${REPLAY_FILE_MREG} map-registers-sequential-no-auth.pcap
24 ${REPLAY_FILE_MRGA} map-registers-sequential-sha1-auth.pcap
25 ${RPCS_RESULTS_FILE} rpcs.csv
26 ${PPS_RESULTS_FILE} pps.csv
29 Add Simple IPv4 Mappings
30 ${start_date}= Get Current Date
31 Run Process With Logging And Status Check ${MAPPING_BLASTER} --host ${ODL_SYSTEM_IP} --mappings ${MAPPINGS}
32 ${end_date}= Get Current Date
33 ${add_seconds}= Subtract Date From Date ${end_date} ${start_date}
35 ${rpcs}= Evaluate int(${MAPPINGS}/${add_seconds})
37 Append To File ${RPCS_RESULTS_FILE} ${rpcs}\n
39 Generate Map-Request Test Traffic
40 ${pps_mrep}= Lossy Test 2 ${REPLAY_FILE_MREQ}
41 Set Suite Variable ${pps_mrep}
43 Generate Map-Register Test Traffic
44 Allow Unauthenticated Map-Registers
45 ${pps_mnot}= Lossy Test 4 ${REPLAY_FILE_MREG}
46 Set Suite Variable ${pps_mnot}
48 Generate Authenticated Map-Register Test Traffic
49 Allow Authenticated Map-Registers
50 ${pps_mnot_auth}= Lossy Test 4 ${REPLAY_FILE_MRGA}
51 Set Suite Variable ${pps_mnot_auth}
55 Clear Config Datastore
56 Clear Operational Datastore
59 Clear Config Datastore
60 ${resp}= RequestsLibrary.Delete Request session /restconf/config/odl-mappingservice:mapping-database
63 Clear Operational Datastore
64 ${resp}= RequestsLibrary.Delete Request session /restconf/operational/odl-mappingservice:mapping-database
68 [Arguments] ${lisp_type} ${replay_file}
69 [Documentation] This test will send traffic at a rate that is known to be
70 ... higher than the capacity of the LISP Flow Mapping service and count
71 ... the reply messages. Using the test's time duration, it computes the
72 ... average reply packet rate in packets per second
73 ${elapsed_time}= Generate Test Traffic ${REPLAY_PPS} ${REPLAY_CNT} ${replay_file}
74 ${odl_tx_count}= Get Control Message Stats ${lisp_type} tx-count
75 ${pps}= Evaluate int(${odl_tx_count}/${elapsed_time})
81 [Arguments] ${replay_pps} ${replay_cnt} ${replay_file}
83 ${result}= Run Process With Logging And Status Check /usr/local/bin/udpreplay --pps ${replay_pps} --repeat ${replay_cnt}
84 ... --host ${ODL_SYSTEM_IP} --port 4342 ${replay_file}
85 ${partial}= Fetch From Left ${result.stdout} s =
87 ${time}= Fetch From Right ${partial} ${SPACE}
88 ${time}= Convert To Number ${time}
93 ${resp}= RequestsLibrary.Post Request session ${LFM_SB_RPC_API}:reset-stats
95 Should Be Equal As Strings ${resp.status_code} 200
97 Allow Unauthenticated Map-Registers
98 ${add_key}= OperatingSystem.Get File ${JSON_DIR}/rpc_add-key_default_no-auth.json
99 Post Log Check ${LFM_RPC_API}:add-key ${add_key}
101 Allow Authenticated Map-Registers
102 ${add_key}= OperatingSystem.Get File ${JSON_DIR}/rpc_add-key_default.json
103 Post Log Check ${LFM_RPC_API}:add-key ${add_key}
105 Get Control Message Stats
106 [Arguments] ${lisp_type} ${stat_type}
107 ${resp}= RequestsLibrary.Post Request session ${LFM_SB_RPC_API}:get-stats
109 ${output}= Get From Dictionary ${resp.json()} output
110 ${stats}= Get From Dictionary ${output} control-message-stats
111 ${ctrlmsg}= Get From Dictionary ${stats} control-message
112 ${ctrlmsg_type}= Get From List ${ctrlmsg} ${lisp_type}
113 ${msg_cnt}= Get From Dictionary ${ctrlmsg_type} ${stat_type}
114 ${msg_cnt}= Convert To Integer ${msg_cnt}
119 Create File ${RPCS_RESULTS_FILE} store/s\n
120 Create File ${PPS_RESULTS_FILE} replies/s,notifies/s,notifies/s\n
121 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
122 Run Process With Logging And Status Check wget -P ${TOOLS_DIR} ${LISP_SCAPY}
123 Run Process With Logging And Status Check ${PCAP_CREATOR} --requests ${MAPPINGS}
126 Append To File ${PPS_RESULTS_FILE} ${pps_mrep},${pps_mnot},${pps_mnot_auth}\n
128 Remove File ${TOOLS_DIR}/lisp.py*
129 Remove File ${REPLAY_FILE_MREQ}
130 Remove File ${REPLAY_FILE_MREG}
131 Remove File ${REPLAY_FILE_MRGA}