X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FMininetKeywords.robot;h=2528d7882f3750dee9a157a35a96a286fe38c96f;hb=d429e3c8acaccd2e34163a45e28d85ecba58df16;hp=416b27274baf1eb75ac88292aca81c77749b43f3;hpb=f1261006656179a8276fa6dd3878b1fe326e22e0;p=integration%2Ftest.git diff --git a/csit/libraries/MininetKeywords.robot b/csit/libraries/MininetKeywords.robot index 416b27274b..2528d7882f 100644 --- a/csit/libraries/MininetKeywords.robot +++ b/csit/libraries/MininetKeywords.robot @@ -120,6 +120,19 @@ Stop Mininet And Exit Multiple Sessions : FOR ${mininet_conn} IN @{mininet_conn_list} \ MininetKeywords.Stop Mininet And Exit ${mininet_conn} +Disconnect Cluster Mininet + [Arguments] ${action}=break ${member_index_list}=${EMPTY} + [Documentation] Break and restore controller to mininet connection via iptables. + ${index_list} = ClusterManagement.List_Indices_Or_All given_list=${member_index_list} + : FOR ${index} IN @{index_list} + \ ${rule} = BuiltIn.Set Variable OUTPUT -p all --source ${ODL_SYSTEM_${index}_IP} --destination ${TOOLS_SYSTEM_IP} -j DROP + \ ${command} = BuiltIn.Set Variable If '${action}'=='restore' sudo /sbin/iptables -D ${rule} sudo /sbin/iptables -I ${rule} + \ Log To Console ${ODL_SYSTEM_${index}_IP} + \ Utils.Run Command On Controller ${ODL_SYSTEM_${index}_IP} cmd=${command} + \ ${command} = BuiltIn.Set Variable sudo /sbin/iptables -L -n + \ ${output} = Utils.Run Command On Controller cmd=${command} + \ BuiltIn.Log ${output} + Verify Aggregate Flow From Mininet Session [Arguments] ${mininet_conn}=${EMPTY} ${flow_count}=0 ${time_out}=0s [Documentation] Verify flow count per switch