diff options
-rw-r--r-- | execs/conf-net.yaml | 10 | ||||
-rw-r--r-- | multinodes/lng03-lng04-ubuntu-18.04.yaml | 5 | ||||
-rwxr-xr-x | scripts/conf-net.sh | 14 |
3 files changed, 29 insertions, 0 deletions
diff --git a/execs/conf-net.yaml b/execs/conf-net.yaml new file mode 100644 index 0000000..604e451 --- /dev/null +++ b/execs/conf-net.yaml @@ -0,0 +1,10 @@ +metadata: + name: conf-net + format: "Lava-Test-Shell Test Definition 1.0" + description: "Configure networking on host" + version: 1.0 + +run: + steps: + - echo "Configure networking on host" + - ./scripts/conf-net.sh diff --git a/multinodes/lng03-lng04-ubuntu-18.04.yaml b/multinodes/lng03-lng04-ubuntu-18.04.yaml index b8622a0..346da91 100644 --- a/multinodes/lng03-lng04-ubuntu-18.04.yaml +++ b/multinodes/lng03-lng04-ubuntu-18.04.yaml @@ -92,6 +92,11 @@ actions: from: git path: execs/iproute-build.yaml name: taprio-build-iproute + + - repository: https://git.linaro.org/people/ilias.apalodimas/lava-sessions.git/ + from: git + path: execs/conf-net.yaml + name: configure-network - repository: https://git.linaro.org/people/ilias.apalodimas/lava-sessions.git/ from: git diff --git a/scripts/conf-net.sh b/scripts/conf-net.sh new file mode 100755 index 0000000..e7589a4 --- /dev/null +++ b/scripts/conf-net.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +. scripts/lava-common.sh +# set hostname +hostname $(lava-role) + +iface=$(find_vland_iface) + +# configure an ip +# 200 hosts should be enough +last=$(lava-self) +last=$(((last % 200) + 1)) +ip='192.168.200.'"$last/24" +ip addr add dev "$iface" "$ip" |