-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mgmt-net: properly setting the master on the veth with a mgmt-net lin…
…k endpoint (#1741)
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
*** Settings *** | ||
Library OperatingSystem | ||
Library String | ||
Library Process | ||
Resource ../common.robot | ||
|
||
Suite Setup Setup | ||
Suite Teardown Run Keyword Teardown | ||
|
||
|
||
*** Variables *** | ||
${lab-name} mgmtnetif | ||
${topo} ${CURDIR}/16-mgmtnetinterface.clab.yml | ||
${runtime} docker | ||
|
||
|
||
*** Test Cases *** | ||
Deploy ${lab-name} lab | ||
${result} = Run Process | ||
... sudo -E ${CLAB_BIN} --runtime ${runtime} deploy -t ${topo} | ||
... shell=True | ||
Log ${result.stdout} | ||
Should Be Equal As Integers ${result.rc} 0 | ||
|
||
Check host side interface is attached to mgmt bridge and up | ||
${params} = Set Variable docker network inspect clab --format '{{ $opt := index .Options "com.docker.network.bridge.name"}}{{ $opt }}' | ||
${mgmtbrname} = Run Process ${params} | ||
... shell=True | ||
Log ${mgmtbrname.stdout} | ||
${result} = Run Process | ||
... sudo -E ip link show dev l1eth1 | ||
... shell=True | ||
Log ${result.stdout} | ||
Should Be Equal As Integers ${result.rc} 0 | ||
Should Contain ${result.stdout} state UP | ||
Should Contain ${result.stdout} master ${mgmtbrname.stdout} | ||
|
||
*** Keywords *** | ||
Teardown | ||
# destroy all labs | ||
Run sudo -E ${CLAB_BIN} --runtime ${runtime} destroy -c -a | ||
|
||
Setup | ||
# skipping this test suite for podman for now | ||
Skip If '${runtime}' == 'podman' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: mgmtnetif | ||
|
||
topology: | ||
nodes: | ||
l1: | ||
kind: linux | ||
image: alpine:latest | ||
cmd: sleep infinity | ||
links: | ||
- endpoints: [l1:eth1, mgmt-net:l1eth1] |