From a4b923933325fa1f31017ce072f59901dbe35773 Mon Sep 17 00:00:00 2001 From: Ivan Hrasko Date: Thu, 16 Aug 2018 16:36:27 +0200 Subject: [PATCH] SXP clustering: create virtual interface - create virtual interface used for assigning cluster routing VIRTUAL_IP Change-Id: I06851fca8beb9c541720a53233a699311d19d0ca Signed-off-by: Ivan Hrasko --- csit/libraries/SxpClusterLib.robot | 14 ++++++++++++++ .../sxp/cluster-routing/010_Route_Switching.robot | 2 ++ 2 files changed, 16 insertions(+) diff --git a/csit/libraries/SxpClusterLib.robot b/csit/libraries/SxpClusterLib.robot index d97aa12238..f6061c8718 100644 --- a/csit/libraries/SxpClusterLib.robot +++ b/csit/libraries/SxpClusterLib.robot @@ -154,3 +154,17 @@ Shutdown Tools Node ${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 Eth0 + [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 eth0 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 Eth0 + [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 eth0 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} diff --git a/csit/suites/sxp/cluster-routing/010_Route_Switching.robot b/csit/suites/sxp/cluster-routing/010_Route_Switching.robot index 74abb6fe9e..6361a1c2b9 100644 --- a/csit/suites/sxp/cluster-routing/010_Route_Switching.robot +++ b/csit/suites/sxp/cluster-routing/010_Route_Switching.robot @@ -66,12 +66,14 @@ Setup Custom SXP Cluster Session SxpClusterLib.Setup SXP Cluster Session ${mac_addresses} = SxpClusterLib.Map Followers To Mac Addresses BuiltIn.Set Suite Variable ${MAC_ADDRESS_TABLE} ${mac_addresses} + SxpClusterLib.Create Virtual Interface Eth0 Clean Custom SXP Cluster Session [Documentation] Cleans up resources generated by test ${controller_index} = SxpClusterLib.Get Active Controller SxpLib.Clean Routing Configuration To Controller controller${controller_index} SxpClusterLib.Clean SXP Cluster Session + SxpClusterLib.Delete Virtual Interface Eth0 Isolate SXP Controller [Arguments] ${controller_index} -- 2.36.6