Skip to content

Commit 2b7cf66

Browse files
Sergio Chavezmichelredondo
andauthored
Do not set exposed ports for SR-SIM linecards (#2745)
* Fix SR-SIM port mapping when using Grouped topology * test feature * it seems Robot doesn't support set the port * change test to use lsof instead of ssh --------- Co-authored-by: Michel Redondo <[email protected]>
1 parent 48d36a9 commit 2b7cf66

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

nodes/sros/sros.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ func (n *sros) setupComponentNodes() error {
386386
componentConfig.Fqdn = n.calcComponentFqdn(c.Slot)
387387
if idx != 0 {
388388
componentConfig.DNS = nil
389+
componentConfig.PortBindings = nil
390+
componentConfig.PortSet = nil
389391
}
390392

391393
// add the component env to the componentConfig env

tests/13-srsim/07-srsim-mix.clab.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ topology:
5454
mgmt-ipv6: fd00:10:78:140::2
5555
env:
5656
NOKIA_SROS_SYSTEM_BASE_MAC: 02:f3:00:00:00:00
57+
ports:
58+
- 10022:22
5759
components:
5860
- slot: A
5961
- slot: B

tests/13-srsim/07-srsim-with-mgmt-network.robot

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ Ensure sros is reachable over ssh
3333
... password=NokiaSros1!
3434
... try_for=10
3535

36+
Ensure sros redirect port is open
37+
${rc} ${output} = Run And Return Rc And Output
38+
... sudo lsof -i :10022 | grep -c :10022
39+
Log ${output}
40+
Should Be Equal As Integers ${rc} 0
41+
Should Be Equal As Integers ${output} 2
42+
3643
Verify links in node l1
3744
${rc} ${output} = Run And Return Rc And Output
3845
... ${CLAB_BIN} --runtime ${runtime} exec -t ${CURDIR}/${lab-file-name} --label clab-node-name\=l1 --cmd "ip link show eth1"

0 commit comments

Comments
 (0)