*** Settings ***
Documentation Library containing Keywords used for SXP cluster testing
Library RequestsLibrary
-Library ./Sxp.py
-Resource ./SxpLib.robot
Resource ./ClusterManagement.robot
Resource ./SetupUtils.robot
+Resource ./SxpLib.robot
Resource ../variables/Variables.robot
*** Variables ***
@{SHARD_OPER_LIST} inventory topology default entity-ownership
@{SHARD_CONF_LIST} inventory topology default
+@{SXP_PACKAGE} org.opendaylight.sxp
${DEVICE_SESSION} device_1
${DEVICE_NODE_ID} 1.1.1.1
${CLUSTER_NODE_ID} 2.2.2.2
${SXP_LOG_LEVEL} INFO
-@{SXP_PACKAGE} org.opendaylight.sxp
+${VIRTUAL_IP} ${TOOLS_SYSTEM_2_IP}
+${VIRTUAL_IP_MASK} 255.255.255.0
+${VIRTUAL_INTERFACE} eth0
+${MAC_ADDRESS_TABLE} &{EMPTY}
*** Keywords ***
Setup SXP Cluster Session
[Documentation] Create sessions asociated with SXP cluster setup
- BuiltIn.Wait Until Keyword Succeeds 120 10 SxpLib.Prepare SSH Keys On Karaf ${TOOLS_SYSTEM_IP} ${TOOLS_SYSTEM_USER} ${TOOLS_SYSTEM_PASSWORD}
- ... ${TOOLS_SYSTEM_PROMPT} /tmp
- SxpLib.Setup SXP Session ${DEVICE_SESSION} ${TOOLS_SYSTEM_IP}
: FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
\ BuiltIn.Wait Until Keyword Succeeds 120 10 SxpLib.Prepare SSH Keys On Karaf ${ODL_SYSTEM_${i+1}_IP}
\ SxpLib.Setup SXP Session controller${i+1} ${ODL_SYSTEM_${i+1}_IP}
${stdout} = BuiltIn.Run Keyword And Return If ${rc} == 0 Utils.Run Command On Remote System ${ip_address} sudo shutdown -P 0 ${user}
... ${passwd}
BuiltIn.Log ${stdout}
+
+Create Virtual Interface
+ [Documentation] Create virtual interface on all of the cluster nodes
+ : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ \ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo modprobe dummy ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ \ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo ip link set name ${VIRTUAL_INTERFACE} dev dummy0 ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ \ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${i+1}_IP} sudo ip link show ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+
+Delete Virtual Interface
+ [Documentation] Create virtual interface on all of the cluster nodes
+ : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ \ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo ip link delete ${VIRTUAL_INTERFACE} type dummy ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ \ Utils.Run Command On Remote System ${ODL_SYSTEM_${i+1}_IP} sudo rmmod dummy ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}
+ \ Utils.Run Command On Remote System And Log ${ODL_SYSTEM_${i+1}_IP} sudo ip link show ${ODL_SYSTEM_USER} ${ODL_SYSTEM_PASSWORD}