Skip to content

Commit 1196a01

Browse files
authored
Show node where command is executed first (srl-labs#2503)
* display node where command is executed first * link symbol * fix token positions in the tests * keyword fix
1 parent 94c2451 commit 1196a01

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

clab/exec/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ func (ec *ExecCollection) Log() {
262262
default:
263263
log.Info(
264264
"Executed command",
265-
"command", er.GetCmdString(),
266265
"node", k,
266+
"command", er.GetCmdString(),
267267
"stdout", er.GetStdOutString(),
268268
)
269269
}

links/link_veth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func (l *LinkVEth) deployBEnd(ctx context.Context, idx int) error {
195195
l.DeploymentState = LinkDeploymentStateFullDeployed
196196

197197
if len(l.Endpoints) == 2 {
198-
log.Infof("Created link: %s <--> %s", l.Endpoints[0], l.Endpoints[1])
198+
log.Infof("Created link: %s ▪┄┄▪ %s", l.Endpoints[0], l.Endpoints[1])
199199
}
200200

201201
return nil

tests/01-smoke/01-basic-flow.robot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ ${n2-ipv4} 172.20.20.100/24
1818
${n2-ipv6} 3fff:172:20:20::100/64
1919
${table-delimit}
2020
${l1-uname-exec-output} SEPARATOR=\n
21-
... Executed command command="uname -n" node=clab-2-linux-nodes-l1
21+
... Executed command node=clab-2-linux-nodes-l1 command="uname -n"
2222
... ${SPACE}${SPACE}stdout=
2323
... ${SPACE}${SPACE}│ l1
2424
${l2-uname-exec-output} SEPARATOR=\n
25-
... Executed command command="uname -n" node=clab-2-linux-nodes-l2
25+
... Executed command node=clab-2-linux-nodes-l2 command="uname -n"
2626
... ${SPACE}${SPACE}stdout=
2727
... ${SPACE}${SPACE}│ l2
2828
${l3-uname-exec-output} SEPARATOR=\n
29-
... Executed command command="uname -n" node=clab-2-linux-nodes-l3
29+
... Executed command node=clab-2-linux-nodes-l3 command="uname -n"
3030
... ${SPACE}${SPACE}stdout=
3131
... ${SPACE}${SPACE}│ l3
3232

tests/01-smoke/18-stages.robot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ ${lab-file} stages.clab.yml
1515
${lab-name} stages
1616
${runtime} docker
1717
${n4-exec-output} SEPARATOR=\n
18-
... Executed command command="uname -n" node=node4
18+
... Executed command node=node4 command="uname -n"
1919
... ${SPACE}${SPACE}stdout=
2020
... ${SPACE}${SPACE}│ node4
2121
${n4-exec-healthy-output} SEPARATOR=\n
22-
... Executed command command="echo hey I am exiting healthy stage" node=node4
22+
... Executed command node=node4 command="echo hey I am exiting healthy stage"
2323
... ${SPACE}${SPACE}stdout=
2424
... ${SPACE}${SPACE}│ hey I am exiting healthy stage
2525

@@ -81,7 +81,7 @@ Ensure node4 executed on-exit commands for its healthy stage
8181
Ensure node3 executed on-exit commands for its create stage and this output doesn't contain any non eth0/lo interfaces
8282
${extracted_text} = Extract Text Between Markers
8383
... ${deploylog.stderr}
84-
... INFO Executed command command="ls /sys/class/net/" node=node3
84+
... INFO Executed command node=node3 command="ls /sys/class/net/"
8585

8686
Log extracted node3 output is${\n}${extracted_text} console=${True}
8787

@@ -98,7 +98,7 @@ Ensure node3 executed on-exit commands for its create stage and this output does
9898
Ensure node1 executed on-enter commands for its create-links stage and this output doesn't contain any non eth0/lo interfaces
9999
${extracted_text} = Extract Text Between Markers
100100
... ${deploylog.stderr}
101-
... INFO Executed command command="ls /sys/class/net/" node=node1
101+
... INFO Executed command node=node1 command="ls /sys/class/net/"
102102

103103
Log ${extracted_text} console=${True}
104104

0 commit comments

Comments
 (0)