Skip to content

Commit 4ac78a4

Browse files
committed
Fix DriveNets default node services and interface count
- Fix SSH service inside port to match outside port (22 instead of 9339) - Add gNMI service on port 51337 - Add gNMI-SSL service on port 52443 - Fix interface count off-by-one (add +1 for management interface) Made-with: Cursor
1 parent 9afa2bf commit 4ac78a4

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

topo/node/drivenets/drivenets.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,24 @@ var (
5757
// https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=gnmi
5858
22: {
5959
Names: []string{"ssh"},
60-
Inside: 9339,
60+
Inside: 22,
6161
},
6262
830: {
6363
Names: []string{"netconf"},
6464
Inside: 830,
6565
},
6666
50051: {
67-
Names: []string{"gnmi"},
67+
Names: []string{"grpc"},
6868
Inside: 50051,
6969
},
70+
51337: {
71+
Names: []string{"gnmi"},
72+
Inside: 51337,
73+
},
74+
52443: {
75+
Names: []string{"gnmi-ssl"},
76+
Inside: 52443,
77+
},
7078
},
7179
Config: &tpb.Config{
7280
ConfigFile: "default",
@@ -171,7 +179,7 @@ func (n *Node) cdnosCreate(ctx context.Context) error {
171179
ConfigFile: config.ConfigFile,
172180
InitImage: config.InitImage,
173181
Ports: ports,
174-
InterfaceCount: len(nodeSpec.Interfaces),
182+
InterfaceCount: len(nodeSpec.Interfaces) + 1,
175183
InitSleep: int(config.Sleep),
176184
Resources: node.ToResourceRequirements(nodeSpec.Constraints),
177185
Labels: nodeSpec.Labels,

0 commit comments

Comments
 (0)